- Home /
Can't get the animation to trigger while the player is moving
I have attached an animator to my Player object and the animations work as intended except that the Player moves physically first before the 'jump' animation. I am working on a grid based system so I want it to look as if the player is jumping onto another block. I have tried rearranging the order of the animation and the player movement but to no avail. I am using a trigger to initiate the animation movement.
animator.SetTrigger ("Scrapper_Move");
AttemptMove<Wall> (horizontal, vertical);
Any advice would be appreciated.
Does your animation have a delay? It looks to me like you need to sync it up, in which case you should probably use a Coroutine to check for a certain animation frame being played and once that animation frame is played, execute movement.
Your answer
![](https://koobas.hobune.stream/wayback/20220612134558im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Player movement on a grid? 1 Answer
Can the animation editor create local rotational data? 3 Answers
Adding animation clips via script 2 Answers