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

ERROR changing a collider's mass cancels its linearVelocity #263

Closed
quinton-ashley opened this issue Sep 9, 2023 · 5 comments
Closed

ERROR changing a collider's mass cancels its linearVelocity #263

quinton-ashley opened this issue Sep 9, 2023 · 5 comments

Comments

@quinton-ashley
Copy link

quinton-ashley commented Sep 9, 2023

Changing a collider's mass using body.setMassData cancels its linearVelocity. I think linearVelocity should be maintained in most cases. Perhaps there's a bug in how the collider's new linearVelocity is calculated.

@shakiba
Copy link
Collaborator

shakiba commented Sep 9, 2023

I guess it was fixed here

Are you using the latest version?

@quinton-ashley
Copy link
Author

yeah I'm using v1 beta 15 planck.min.js

@shakiba
Copy link
Collaborator

shakiba commented Sep 9, 2023

Ops, that commit fixes resetMassData; setMassData was not fixed. I just fixed it and published the update.

@quinton-ashley
Copy link
Author

Awesome! thank you 🙏🏻

@shakiba
Copy link
Collaborator

shakiba commented Sep 9, 2023

Thanks for reporting the issue!

@shakiba shakiba closed this as completed Sep 9, 2023
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