- Home /
npc move when playing walk animation?
Hi i made a basic npc, she has a follow script that makes her follow you once you get close enought to her. She also has a animator that makes her play an idle animation and a run animation. The problem is that when she plays the run animation, she dosnt move at all. Could anyone help me with making it so the npc could move forward while playing the walk animation? sorry if i made it sound complicated Thanks
Answer by Cherno · Jun 22, 2015 at 05:54 PM
You don't need to link the movement to any animations playing. Just play the run animation, and at the same time use Transform.Lerp or whatever to make her move through the world. If you want to find out how to make objects move, check the Unity Scripting API for Transform.Translate, Vector3.Lerp, Vector3.MoveTowards.
Your answer
Follow this Question
Related Questions
How do you move a character with physics when using Animator.setInteger to play the animations? 0 Answers
root motion on in place animation 0 Answers
changing the Animation by Player's position relative to the enemy 0 Answers
2 problems with new animation / animator,2 problems with animation 0 Answers