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 rotation change detection in integrator #284

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Conversation

Jondolf
Copy link
Owner

@Jondolf Jondolf commented Dec 27, 2023

Objective

In #272, the integrator was changed to update rotation only if delta.w != 0.0. However, in some cases, x, y, or z can be non-zero even if w is zero, like with AngularVelocity(Vec3::X), and in those cases the rotation would incorrectly be ignored.

Solution

Make the condition stricter by also checking if x, y, and z are 0. Based on a quick test, this should also keep change detection working, which is what #272 was trying to address.

@Jondolf Jondolf added the bugfix label Dec 27, 2023
@Jondolf Jondolf merged commit 370354f into main Dec 27, 2023
4 checks passed
@Jondolf Jondolf deleted the fix-integrator-rotation branch December 27, 2023 21:58
@Jondolf Jondolf added C-Bug Something isn't working A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on and removed bugfix labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on C-Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant