Compare commits

...

2 Commits
v0.0.2 ... main

Author SHA1 Message Date
eea5cc4e4c move key_helper to utils directory 2025-08-13 15:17:47 +10:00
e6737223be move key idle waving anim out of sod 2025-08-13 15:17:13 +10:00
3 changed files with 7 additions and 6 deletions

View File

@ -326,13 +326,8 @@ func _reset_animations() -> void:
func _animate(delta: float) -> void: func _animate(delta: float) -> void:
position = _pos_sod.process(delta, _animate_position()) position = _pos_sod.process(delta, _animate_position())
rotation = lerp(rotation, _default_rot, delta * _rotation_damping)
position.y += (
func _animate_position() -> Vector3:
var new_position := _default_pos
new_position.y += (
sin( sin(
( (
_keyboard.anim_time _keyboard.anim_time
@ -344,6 +339,12 @@ func _animate_position() -> Vector3:
* _keyboard.key_size * _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 new_position.y -= (_press_offset * _keyboard.key_size) if _is_pressed else 0.0
return new_position return new_position