- Home /
Animation confusion using Animator
I also asked this on the gamedev stack exchange here, but:
I'm pretty far down the line with making a ball/cup game where a cup has a ball inside, it swaps them around (using legacy runtime AnimationClips) and the player must select a cup to reveal the ball when the movements are finished.
I want to experiment with the Animator component and the Mechanim state machine stuff and would like to lift a cup up to reveal a ball inside. The ball is a PrimativeType.Sphere rendered in the parent Gameobject of the cup itself, so that if the cup model is lifted, the ball remains on the ground.
I want to use the Animator for this and try it out, I don't know if I quite understand the concept behind it.
In my mind, the cup can have 2 states:
Idle, and;
Lifted
Thus, I created 2 states, where the Idle state is the main state of my Animator's main layer. They can transition between one another by means of a bool parameter IsLifted.
The cup does nothing while it is in these states, thus, the transition itself should glide between the cup being upside down on the surface, and hovering in the air.
I got this all right, except obviously the cup flashes between it's states which is annoying.
There also seems to be a delay from the point where I set the parameter, to when the cup responds and changes state.
Any advice?
Your answer
![](https://koobas.hobune.stream/wayback/20220612175732im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can't change position of animation object 0 Answers
Why isn't my gun showing up when I play in maximised mode? (Mechanim Animator) 1 Answer
What are the best practices for syncing/duplicating/instancing complex skinned animations? 0 Answers
Mechainm Animation to Ragdoll 1 Answer
Trouble using root motion. 0 Answers