Try to lock angular velocity when not rotating.

This commit is contained in:
Nolan Darilek 2021-06-10 11:16:18 -05:00
parent a461b0907f
commit 06d47a0a60

View File

@ -108,7 +108,11 @@ fn movement_controls<S, A: 'static>(
}
if input.active(rotate_right) {
position.position.rotation *= UnitComplex::new(-delta);
} else {
velocity.angvel = 0.;
}
} else {
velocity.angvel = 0.;
}
if direction.length_squared() != 0. {
commands.entity(entity).remove::<Destination>();