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

Reset velocity and constraint jAcc when body type changes to DYNAMIC #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

viblo
Copy link

@viblo viblo commented Nov 11, 2023

A fix for #238

(cherry picked from commit e13d977f723ae3d2b743cb278eae25e107d71e35)
(cherry picked from commit f23cbc2)
@slembcke
Copy link
Owner

Another minor issue to point out with this is that if you are adding constraints between non-dynamic bodies, they don't do anything except consume CPU time generating unused NaNs. The client code already needs to be adding and tracking a list of constraints somewhere, all they need to do to fix this is to remove the constraints when making the body static.

I don't doubt that this patch works, but I think I need some more convincing that adding this workaround is worth it as, again this is the first time in 15 years I've heard of someone wanting this.

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

Successfully merging this pull request may close these issues.

None yet

2 participants