Fix: integrate rotation *correctly*

Something something quaternions are hard. I thought I would take the two
"things", add them together, and then put them back into the transform.

That's clearly not how it works :v
This commit is contained in:
2025-08-09 16:04:51 -05:00
parent e841facf73
commit d4f11faf5a

View File

@@ -30,8 +30,7 @@ pub(crate) fn integrate_angular_velocity(
) { ) {
for (mut transform, ang_vel) in &mut objects { for (mut transform, ang_vel) in &mut objects {
let delta = ang_vel.0 * time.delta_secs(); let delta = ang_vel.0 * time.delta_secs();
let temp = transform.rotation + Quat::from_rotation_z(delta); transform.rotate_z(delta);
transform.rotation = temp;
} }
} }