move key idle waving anim out of sod
This commit is contained in:
parent
d609bdb21d
commit
e6737223be
@ -326,13 +326,8 @@ func _reset_animations() -> void:
|
||||
|
||||
func _animate(delta: float) -> void:
|
||||
position = _pos_sod.process(delta, _animate_position())
|
||||
rotation = lerp(rotation, _default_rot, delta * _rotation_damping)
|
||||
|
||||
|
||||
func _animate_position() -> Vector3:
|
||||
var new_position := _default_pos
|
||||
|
||||
new_position.y += (
|
||||
position.y += (
|
||||
sin(
|
||||
(
|
||||
_keyboard.anim_time
|
||||
@ -344,6 +339,12 @@ func _animate_position() -> Vector3:
|
||||
* _keyboard.key_size
|
||||
)
|
||||
|
||||
rotation = lerp(rotation, _default_rot, delta * _rotation_damping)
|
||||
|
||||
|
||||
func _animate_position() -> Vector3:
|
||||
var new_position := _default_pos
|
||||
|
||||
new_position.y -= (_press_offset * _keyboard.key_size) if _is_pressed else 0.0
|
||||
|
||||
return new_position
|
||||
|
||||
Loading…
Reference in New Issue
Block a user