I have quite a complex problem, I hope I can explain it correctly.
I'm working on adding a tutorial to our game, it is a little hand that will show the player where the character (block) should be moved to (see the attached image). We have a spine animation of the hand animating in four directions (up, down, left, right) I have the hand skeleton animation in the scene and set to invisible. When I want to show the tutorial I set the skeleton animation to visible and start the correct animation, like so
tutorialSkeleton.state.ClearAnimation(); //this is called so the animation will start over
tutorialSkeleton.animationName = "hand_left_right";
I noticed that when the skeleton animation is invisible in the scene I can't select a default animation. But the default animation that I select before I set the skeleton animation to invisible does have effect on what happens when I try to show the tutorial in the active game. I have two problems, right before the animation starts I can see the skeleton animation snap visible in an old position, I think it is the default animation that is set in the scene. Also the default animation that I select has influence on where the animation is positioned. For example when I set the default animation from right to left and in the game show the up to down animation and I will make sure it is positioned on top of the character everything goes okay. But if I change the default animation to left to right for example, suddenly when I show the up to down animation in the game the position is not right.
Is there a way to remove that snap? And to make sure the animation always starts in the same position? Am I not calling the right functions? The only solution I could think of is having a separate json for each direction of the hand animation, but I was wondering if there was an other way.
I hope you can make some sense of this. Any advice would be appreciated!