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

fix(user_changes): Fix RigidBodyType changed to Dynamic not added to active dynamic set #599

Merged
merged 3 commits into from
Mar 23, 2024

Conversation

MaxCWhitehead
Copy link
Contributor

@MaxCWhitehead MaxCWhitehead commented Mar 11, 2024

I ran into what I believe is a bug in which if a rigid body is changed to dynamic from kinematic, it may never end up in active dynamic set. This caused some issues including gravity not being integrated.

I believe in user changes we should add body to dynamic active if its type changed to dynamic. (And is enabled / not sleeping, the existing conditions).

I added a test to reproduce the issue. The failure seems to only occur if pipeline is stepped (at least) once after creating kinematic body, before switching to dynamic. Without the change to user_changes.rs, both conditions will fail in test.

Please let me know if I am somehow using API wrong and this is not a bug.

@sebcrozet
Copy link
Member

That makes sense. Thank you for the fix!

@sebcrozet sebcrozet merged commit f943fd9 into dimforge:master Mar 23, 2024
5 checks passed
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