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

how to prevent rotation when collision occurs? #39

Closed
ghost opened this issue Jul 11, 2014 · 2 comments
Closed

how to prevent rotation when collision occurs? #39

ghost opened this issue Jul 11, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 11, 2014

Will.. it may be a dummy question, but I am a newbie of this awesome engine.

But I can not find api for this purpose should I just set rotate to 0 for the body in every frame?

@liabru
Copy link
Owner

liabru commented Jul 11, 2014

Try setting body.inertia to Infinity when you create your body.

If you need more control, see issue #29

@ghost
Copy link
Author

ghost commented Jul 11, 2014

Thanks! I want to build a platformer, it seems a important feature for character. :)

@ghost ghost closed this as completed Jul 11, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant