- Home /
One animation overlaps the other
Hi guys,
I have a 2D character controller with all kinds of animations. Now, I created a new animation of climbing. I always check if my player is grounded. If it is not, jump animation is playing but when the player is on a ladder, jump animation is turned on but no animation of climbing is playing (the animation is overlaped by the other). I need to turn off my animation of jumping while the climb animation is being played. How should I do it? Please help me. I am new to unity.
Answer by ZacGarby · Sep 26, 2015 at 09:15 PM
What I'd do is create a bool variable called isClimbing, and set it to true
while you're climbing, and false
if not. Then, in your animator window, make sure that the link going to jump only happens if isClimbing is false. If you're not using the animator window, and controlling the animations from a script, firstly, i'd suggest using it, and secondly, when you change to the jump animation, just before that check for isClimbing being false.
Hey, thanks a lot. How simple. I added a new condition in the animator for jump only when bool Climbing equals false and that's it! I started to study animation layers but seemed so complex... Now I have no need to use them :-) Thank you very much.
Your answer
![](https://koobas.hobune.stream/wayback/20220612035125im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Blurry animations on android 0 Answers
How To Mirror Animation 1 Answer
2D Platformer Ghost Replay 2 Answers
Animation blocking rotation 2 Answers
2D Animation Transition Bug 0 Answers