Skip to content

Commit

Permalink
Fix rotation change check in integrator
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Dec 27, 2023
1 parent db22413 commit 4840a4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/integrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ fn integrate_rot(mut bodies: Query<RotIntegrationComponents, Without<Sleeping>>,
.extend(delta_secs * 0.5 * q.w);
// avoid triggering bevy's change detection unnecessarily
let delta = Quaternion::from_vec4(effective_dq);
if delta.w != 0.0 {
if delta != Quaternion::from_xyzw(0.0, 0.0, 0.0, 0.0) {
rot.0 = (rot.0 + delta).normalize();
}
}
Expand Down

0 comments on commit 4840a4a

Please sign in to comment.