Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[corona] Provide physics integration example #892

Closed
badlogic opened this issue May 5, 2017 · 4 comments
Closed

[corona] Provide physics integration example #892

badlogic opened this issue May 5, 2017 · 4 comments
Assignees

Comments

@badlogic
Copy link
Collaborator

badlogic commented May 5, 2017

See http://esotericsoftware.com/forum/Corona-Help-to-position-bounding-box-on-a-bone-1855?p=38645#p38645

@kadlugan
Copy link

Howdy badlogic, its kadlugan from the esoteric forums here. I hope things are going well.

I noticed a change of status for this issue to 'ready'. Does this mean that you have a working example up and running? Fingers crossed. :)

@badlogic
Copy link
Collaborator Author

I've looked into it already. It's a mess because the physics API of Corona is pretty terrible. Any bounding shapes we submit will be centered automatically (!!!) and there's no obvious way how to compensate for this. I'll keep trying to make something sane.

@kadlugan
Copy link

kadlugan commented Jul 15, 2017

Thanks badlogic,

Yeah, it does seem to be a recurring issue of getting deep enough access via the API to do what you need in a simple way. I appreciate your continued persistence. The following are a couple of suggestions - you may have already considered as you know more about the challenges than i do.

Have you tried using an outline body or chain body?
https://docs.coronalabs.com/guide/physics/physicsBodies/index.html#outline-bodies
Some suggestions point to compensating for centering using this approach
https://forums.coronalabs.com/topic/41422-problem-with-polygon-based-physic-body-position/page-2
https://stackoverflow.com/questions/5271583/center-of-gravity-of-a-polygon
https://stackoverflow.com/a/30874002/6652017

There are quite a lot of changes going on at the corona service that includes opening up the code base to allow more to be done (as i understand). They have recently opened up the corona enterprise native API which might give you more access.
https://docs.coronalabs.com/native/C/index.html

You might be able to create a plugin to do what you need using spine-c features.
https://docs.coronalabs.com/native/plugin/index.html
https://docs.coronalabs.com/native/plugin/luaplugin.html

If there are particular issues that you can describe, its not a bad idea to repost your problems back to the corona forums and let some of the gurus there have a crack. (eg Brent Sorrentino, Rob Miracle, roaminggamer, starcrunch)

Im happy to help where i can

@badlogic
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants