fix ocer-compensation of framerate

This commit is contained in:
betalars 2023-03-14 22:08:17 +01:00
parent 63397c7424
commit 4b906e0fe4
1 changed files with 76 additions and 76 deletions

View File

@ -69,7 +69,7 @@ func _handle_movement(delta:float):
apply_central_impulse(direction*delta) apply_central_impulse(direction*delta)
func _handle_rotation(delta:float): func _handle_rotation(delta:float):
var smoothness = 60/Engine.get_frames_per_second() var smoothness = min(3, 60.0/Engine.get_frames_per_second())
var input_speed = Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_down")-Input.get_action_strength("look_up")) * gamepad_response var input_speed = Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_down")-Input.get_action_strength("look_up")) * gamepad_response