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:
@@ -30,8 +30,7 @@ pub(crate) fn integrate_angular_velocity(
|
||||
) {
|
||||
for (mut transform, ang_vel) in &mut objects {
|
||||
let delta = ang_vel.0 * time.delta_secs();
|
||||
let temp = transform.rotation + Quat::from_rotation_z(delta);
|
||||
transform.rotation = temp;
|
||||
transform.rotate_z(delta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user