Enemy Only Moves when Animator is Disabled: Lecture #47 - Unity 3rd Person Combat & Traversal
My code looks identical to Nathan’s code, and everything was working fine until I hit play.
My enemy (Werewolf in the picture) detects the player and begins its running animation, but the enemy stays in place. If I select the enemy during runtime, I can see that the Navmesh collider on the enemy DOES move toward the player, but the enemy’s Character Controller collider stays put on the enemy as it runs in place.
Now, if I disable the Animator component on the enemy, it will follow the player no problem, but then it’s stuck in the T-pose animation.
How can I get the enemy to follow the player AND keep the Animator component enabled at the same time?
I attached some screenshots:
Image 1 - default setup in Editor mode (for context)
Image 2 - Animator ENABLED, ONLY enemy’s Navmesh moves toward player, Enemy DOES NOT move and just runs in place (it does switch states though when in/out of range)
Image 3 - Animator DISABLED, the Enemy AND its Navmesh both successfully move toward player, but the Enemy stays in T-pose animation and never leaves
Image 4 - Inspector for Enemy (part 1)
Image 5 - Inspector for Enemy (part 2)