From f2c6f410badf4b7e182929514c9619ebee6a74ab Mon Sep 17 00:00:00 2001 From: Daniel Espinosa Date: Wed, 3 Apr 2024 08:03:51 -0600 Subject: [PATCH] Hands: fix open and close pose script (#627) In order to add an animation, AnimationPlayer should get its AnimationLibrary with empty name "". --- addons/godot-xr-tools/hands/hand.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/godot-xr-tools/hands/hand.gd b/addons/godot-xr-tools/hands/hand.gd index a7b34421..b1a5f70c 100644 --- a/addons/godot-xr-tools/hands/hand.gd +++ b/addons/godot-xr-tools/hands/hand.gd @@ -341,7 +341,7 @@ func _update_pose() -> void: if _animation_player.has_animation(open_name): _animation_player.remove_animation(open_name) - _animation_player.add_animation(open_name, open_pose) + _animation_player.get_animation_library("").add_animation(open_name, open_pose) var open_hand_obj : AnimationNodeAnimation = _tree_root.get_node("OpenHand") if open_hand_obj: @@ -355,7 +355,7 @@ func _update_pose() -> void: if _animation_player.has_animation(closed_name): _animation_player.remove_animation(closed_name) - _animation_player.add_animation(closed_name, closed_pose) + _animation_player.get_animation_library("").add_animation(closed_name, closed_pose) var closed_hand_obj : AnimationNodeAnimation = _tree_root.get_node("ClosedHand1") if closed_hand_obj: