Try to lock angular velocity when not rotating.
This commit is contained in:
parent
a461b0907f
commit
06d47a0a60
|
@ -108,7 +108,11 @@ fn movement_controls<S, A: 'static>(
|
||||||
}
|
}
|
||||||
if input.active(rotate_right) {
|
if input.active(rotate_right) {
|
||||||
position.position.rotation *= UnitComplex::new(-delta);
|
position.position.rotation *= UnitComplex::new(-delta);
|
||||||
|
} else {
|
||||||
|
velocity.angvel = 0.;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
velocity.angvel = 0.;
|
||||||
}
|
}
|
||||||
if direction.length_squared() != 0. {
|
if direction.length_squared() != 0. {
|
||||||
commands.entity(entity).remove::<Destination>();
|
commands.entity(entity).remove::<Destination>();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user