Skip to content

Comments

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

Open
viblo wants to merge 1 commit intoslembcke:masterfrom
viblo:reset-vel
Open

Reset velocity and constraint jAcc when body type changes to DYNAMIC#239
viblo wants to merge 1 commit intoslembcke:masterfrom
viblo:reset-vel

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.

2 participants