Hi,
I’m new in Unity and I’m trying to understand Animations.
I have a game object with an animator. This gameobject has 2 gameobjects and with an animation I make them appear in the screen moving from outside the camera.
Then I make another animation where these objects begin to rotate
But, when the aniamtion state changes to the new animation they rotate in the position outside the camera.
I don’t know why when I changed to the new animation the transform was reseted?
Could anyone help me?
Thanks
Your first animation affects position, your second animation affects rotation. Each animation only touches what it’s told to, and everything else on the object(s) is reset to their value in the scene.
For your current problem, there are two solutions:
- Have your second animation start the objects in the same position that your first animation ended
- Create a new layer in your Animator that’s 100% additive (an additive layer will add any of its animation effects on top of other layers). Then play the first animation on the first layer, and the second animation on the new additive layer.
For more information about additive animation layers, check out: Unity - Manual: Animation Layers