Simple animator/animation problem
I'm currently trying to set up a very simple animation and from what I can see I'm following the tutorials I have seen, but obviously I'm missing some knowledge here
I have the following three simple animations for a simple object (just imagine a 3D cube) :
Idle - Changes scale between 1 and 1.1 in an endless loop (This does NOT change position)
Die- Changes the Y position (starting from 0 going to -100). Also changes the rotation (like falling coin).
Revive- Changes the Y position (starting from -100 to 0). Also change the rotation (reverse falling coin)
These animations doesn't have any animation keys other than those mentioned
In the animator for this is set up just as simple. From entry it goes to Idle. From Idle it can trigger to either Die or Revive. As soon as the animation has ended it needs to go back to Idle, which is where the problem shows up. At this point I'm expecting the Idle animation to be playing at it's current position (-100 if after Die animation or 0 after Revive animation).
For some reason the Idle animation changes the position the object has at the beginning (which in this case is -100 in Y), so straight after Revive animation the Y position is set back to -100, but I want it to stay at position 0
Is there a way to avoid this?
I can see one way to "fix" this problem, but this is IMHO not exactly a great way of doing it. I could make an "Idle_Up" and "Idle_Down" animation, where the Y positions has been set in each of them. Then in the Animator the Die would transition to Idle_Down, where a trigger would transition to Revive and so on.
There needs to be a better way, that I haven't found yet. Anybody out there who would be so kind to give me a few pointers in the right direction?
Your answer
Follow this Question
Related Questions
Animation locks transform, even when not playing 0 Answers
Cant override animations with scripts? 1 Answer
Disable gameObject in animation 0 Answers
After jump animation problem 0 Answers
stickman animation 1 Answer