- Home /
Sliding Issue with my animation
Hi, I just started making a game project with Unity Engine. When I add walking and idling scripts to my character, everything seems alright. But when I test it, if I press the key for moving forward, my character will slide for few second before walking. While sliding, it is moving to the direction I desire to, but I am not sure what is causing the delay of the walking behavior. Thank you.
Answer by dtbrown0801 · Aug 27, 2019 at 09:48 AM
Maybe there are too many lines between the method that checks if it is walking and the animation. For example, you could have
if (walking == true)
{
if(movingForwards=true)
{
Play(audio.GetComponent);
//Finally you do the animation
}
}
Also if it is in the update function the update may be slow. To test this do Fixed Update not update.
Hope This Helps!
Hi, I figured out. It was due to the exit time. Thank you for your support.
Your answer
![](https://koobas.hobune.stream/wayback/20220612211221im_/https://answers.unity.com/themes/thub/images/avi.jpg)