fix plater rotation and key pressed signal

This commit is contained in:
Teatov 2025-08-05 21:22:48 +10:00
parent 7878d8b764
commit 0ba9de1095
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,6 @@ _keys_holder = NodePath("Keys")
_sfx_player = NodePath("SFXPlayer") _sfx_player = NodePath("SFXPlayer")
_rect_mesh = NodePath("RectMesh") _rect_mesh = NodePath("RectMesh")
_key_scene = ExtResource("2_hylia") _key_scene = ExtResource("2_hylia")
_anim_time_scale = null
_layout_swap_sfx = SubResource("AudioStreamRandomizer_hylia") _layout_swap_sfx = SubResource("AudioStreamRandomizer_hylia")
[node name="Keys" type="Node3D" parent="."] [node name="Keys" type="Node3D" parent="."]

View File

@ -204,7 +204,8 @@ func _set_pressing(is_pressed: bool) -> void:
return return
_is_pressed = is_pressed _is_pressed = is_pressed
_set_keyboard_pressed_position(_is_pressed) _set_keyboard_pressed_position(_is_pressed)
_keyboard.emit_key_pressed(self) if _is_pressed:
_keyboard.emit_key_pressed(self)
_play_sfx(_press_sfx if _is_pressed else _release_sfx) _play_sfx(_press_sfx if _is_pressed else _release_sfx)

View File

@ -88,7 +88,7 @@ func _animate_rotation() -> Vector3:
_current_key.get_default_transform().inverse() _current_key.get_default_transform().inverse()
* _current_key.player_pos_marker.global_transform * _current_key.player_pos_marker.global_transform
) )
return _rotation * (rot_translate.basis.get_rotation_quaternion()).get_euler() return (_rotation * rot_translate.basis.get_rotation_quaternion()).get_euler()
func _finish_move(_interrupted: bool) -> void: func _finish_move(_interrupted: bool) -> void: