cleanup
This commit is contained in:
parent
b3885aa4b6
commit
2b4fd9e5b5
|
@ -133,7 +133,8 @@ fn run_camera_controller(
|
|||
if actor.v[i].abs() < threshold {
|
||||
actor.v[i] = 0.0;
|
||||
}
|
||||
else if (actor.v[i] < 0.0 && actor.v[i] + acceleration_total[i] > 0.0) || (actor.v[i] > 0.0 && actor.v[i] + acceleration_total[i] < 0.0) {
|
||||
else if actor.v[i].signum() != (actor.v[i] + acceleration_total[i]).signum() {
|
||||
// Overshoot
|
||||
actor.v[i] = 0.0;
|
||||
acceleration_total[i] = 0.0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue