fix slow braking
This commit is contained in:
parent
dd49906cce
commit
0717495d57
|
@ -81,27 +81,27 @@ fn run_camera_controller(
|
|||
let mut axis_input = Vec3::ZERO;
|
||||
if focused {
|
||||
if key_input.pressed(settings.key_forward) {
|
||||
axis_input.z -= 1.0;
|
||||
axis_input.z -= 1.2;
|
||||
}
|
||||
if key_input.pressed(settings.key_back) {
|
||||
axis_input.z += 1.0;
|
||||
axis_input.z += 1.2;
|
||||
}
|
||||
if key_input.pressed(settings.key_right) {
|
||||
axis_input.x += 1.0;
|
||||
axis_input.x += 1.2;
|
||||
}
|
||||
if key_input.pressed(settings.key_left) {
|
||||
axis_input.x -= 1.0;
|
||||
axis_input.x -= 1.2;
|
||||
}
|
||||
if key_input.pressed(settings.key_up) {
|
||||
axis_input.y += 1.0;
|
||||
axis_input.y += 1.2;
|
||||
}
|
||||
if key_input.pressed(settings.key_down) {
|
||||
axis_input.y -= 1.0;
|
||||
axis_input.y -= 1.2;
|
||||
}
|
||||
if key_input.pressed(settings.key_stop) {
|
||||
let stop_direction = -actor.v.normalize();
|
||||
if stop_direction.length_squared() > 0.3 {
|
||||
axis_input += 0.8 * (transform.rotation.inverse() * stop_direction);
|
||||
axis_input += 1.0 * (transform.rotation.inverse() * stop_direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue