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

switching a p2 body from static or kinematic to dynamic doesn't account for infinite mass #2005

Closed
wayfu opened this issue Aug 14, 2015 · 1 comment

Comments

@wayfu
Copy link

wayfu commented Aug 14, 2015

Helping a dude on the forums, I came across this behaviour: static and kinematic bodies automatically get infinite mass. but switching the body to dynamic later doesn't update the mass properties before the next physics update apparently, so if there's gravity on it (for example), the infinite mass leads to infinite force, and that leads to suffering (ie NaN position values).

photonstorm added a commit that referenced this issue Aug 20, 2015
@photonstorm
Copy link
Collaborator

It would update the mass and set it to 1, but only if the mass was zero. Anything else would ignore it. It now automatically sets the mass to 1 every time, no matter what value it was before.

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

2 participants