player now reduces motion when reduce motion is turned on
This commit is contained in:
parent
477bf3b1a4
commit
d741913c86
|
|
@ -88,7 +88,7 @@ func _physics_process(delta:float):
|
||||||
if has_stage:
|
if has_stage:
|
||||||
_handle_movement(delta)
|
_handle_movement(delta)
|
||||||
_handle_rotation(delta)
|
_handle_rotation(delta)
|
||||||
if jitter_strength > 0: _handle_jitter(delta)
|
if jitter_strength > 0 and not State.reduce_motion: _handle_jitter(delta)
|
||||||
|
|
||||||
func _handle_movement(delta:float):
|
func _handle_movement(delta:float):
|
||||||
var input:Vector2 = Vector2(Input.get_action_strength("player_right") - Input.get_action_strength("player_left"),
|
var input:Vector2 = Vector2(Input.get_action_strength("player_right") - Input.get_action_strength("player_left"),
|
||||||
|
|
@ -138,7 +138,7 @@ func _handle_jitter(delta):
|
||||||
noise.get_noise_1d(loc_noise_spot.z)
|
noise.get_noise_1d(loc_noise_spot.z)
|
||||||
) * location_jitter * jitter_strength
|
) * location_jitter * jitter_strength
|
||||||
|
|
||||||
mount.rotation = Vector3(
|
if not State.reduce_motion: mount.rotation = Vector3(
|
||||||
noise.get_noise_1d(rot_noise_spot.x),
|
noise.get_noise_1d(rot_noise_spot.x),
|
||||||
noise.get_noise_1d(rot_noise_spot.y),
|
noise.get_noise_1d(rot_noise_spot.y),
|
||||||
noise.get_noise_1d(rot_noise_spot.z)
|
noise.get_noise_1d(rot_noise_spot.z)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue