- Home /
Prioritizing Player Animations
I have a hunch that this answer will use "AnimationState.layer" in some way, shape, or form - and also part of my character controller - but this is something that has always tricked me up.
> Let's say my player is doing an idle
> animation. He catches an object, and
> depending on which hand catches it,
> plays a different animation. Once the
> catch animation is finished, the
> controller resumes back to the default
> idle animation.
This would be relatively easy. When my player starts to catch a ball, start a coroutine that plays the correct catching animation, and then resumes the idle animation once it's finished.
> But let's say an enemy attacks while
> the player is catching a ball. A
> missile comes out of nowhere and blows
> up on the player, sending him
> backwards. The correct animation now
> would cancel the catching animation
> (because he's being blown to
> smithereens), and instead of idling,
> the player needs to instead slowly get
> back up into an injured position.
This all goes back to my character controller (and that during the catching code, I need to correctly accept and interpret the enemy attack), but in theory, what's the best way of doing this? I keep thinking that the character controller determines animations, and that animations should not determine how the character controller works
Your answer
![](https://koobas.hobune.stream/wayback/20220613075459im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Player Animation and control panel 2 Answers
Character controller movement 1 Answer
independent arm from body - unity2d 0 Answers
accessing charactercontroller 1 Answer
Why does the character controller script default to a loop? 1 Answer