Animator Position VS Script Vector 3
Hi everyone, I'm having some trouble with an animation for the main enemy in my game. I recently discovered the power of MIXAMO and integrated some animations into the model. The problem is that the script that controls the AI also controls the transformation to be able to follow a certain path determined by waypoints. Walking animation, on the other hand, not only animates the model, but moves it in some particular direction. To put it somewhat, the point here is that the animator overwrites vector3 in the script, or so it seems. On one hand, the script tells the model to follow a waypoint but on the other, the animation tells it to go in the default direction, ignoring the script.
How can I make the animation run, but without considering the direction, and that the latter is only controlled by the script?
In the first image, you'll see what happens when the animator is enabled, the enemy's rotation has no relation to the script, and it can't follow the next waypoint. Instead, he just sits there, randomly rotating based on the animation.
In the second image, the animator is disabled, so the enemy can follow the instructions of the script without any problem, so he completes the path following each waypoint.
Thanks friends, I'll be waiting ;)
PS: In the hierarchy, the animation is the parent, and the bones and the model are the children. AI scripts are linked to the parent, not the children. I mention this as background.
Your answer
Follow this Question
Related Questions
NEED HELP ANIMATING PLAYER MOVEMENT 0 Answers
Animator script 0 Answers
Character won't move 0 Answers
Using same animator for multiple game objects 0 Answers
How do I delay an animation using my character movement script? 1 Answer