"Dodge roll" Animation delayed after changing direction
Hey,
My first question here, Yay! (or maybe thats not a good thing^^)
So ive been learning unity for about 2 months now and so far ive been able to handle all problems ive encountered by searching the forums or random googling. But i cant find a solution anywhere so i thought i try asking here :)
So basically i cant get my dodge rolling animation to work perfectly after my character turns 180 degrees. At first i thought it was because another animation was in the way but it works if i trigger the dodge roll in the middle of an attack animation. It also works if i only turn about 90 degrees but as soon as i do a 180 the character waits with the roll animation.
"Has exit time" is disabled and "transition duration" is set to 0. I have also tried all options for "interruption source on the transition. I uploaded a video of the problem and as you can see it works decently pretty much all the time except when i do a 180.
https://www.youtube.com/watch?v=ZoPG0Yabwuo&feature=youtu.be
I am using a Trigger to start the animation when i press the space button. Appreciate any help i can get! Thanks in advance!
Hi Jonatanisaksson , have you checked the transition settings FRO$$anonymous$$ the 180° turn TO your dodge roll?
Thanks for your interest :): I dont really have a specific animation for the 180 turn. The caracter always walks "forward" and i just change the rotation of the character with the mouse or with the wasd keys. If i rotate the character with the mouse it seems to be working,
Can you show the animatorcontroller privew here so that it wiil be much easier.
Answer by jonatanisaksson · Sep 12, 2019 at 09:43 AM
I solved it!! For future reference if someone should see this thread the problem was in the transition from Idle to Run wich i pretty much ignored for this problem. Basicly my walk animation is based on movespeed and the carachter stops for a split second in the middle of the 180 turn wich causes him to launch a new run animation when the turn is finished. So i just had to make the run to idle animation interrupt the animation from idle to walk for it to work. Turns out it was pretty easy :)