I have created a Prefab containing a baked skeletal animation and a typescript. After some effort, I have observed something:
- The animation can only play if I check the
Play on load
in the editor. No matter how I try to useplay()
inside the script, the animation will not run. - The node will always reset the position to its initial one if I choose the wrap mode as
Loop
.
I want to control the position of the node and run the animation continuously without resetting its position. How can I achieve that?
Update:
- The
play()
function can be used in thestart
function but notonLoad()
.
Now I can play the animation in the script, the question is how can I get the current position fromSkeletalAnimation
to set the position for the parent node?