Skip to content

Commit

Permalink
Hands: fix open and close pose script (#627)
Browse files Browse the repository at this point in the history
In order to add an animation, AnimationPlayer
should get its AnimationLibrary with empty name "".
  • Loading branch information
esodan committed Apr 3, 2024
1 parent 60d7cb1 commit f2c6f41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/godot-xr-tools/hands/hand.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit f2c6f41

Please sign in to comment.