How can I do an Enemy while He's walking his HEAD always see the Target?
When I'll do with LookAt(target) the Head doesn't work, because in the Enemy GameObject He has an animator where the head move with his walk animation, if I deactive it the head works....
Enemy Class
void Start() { headEnemy = GameObject.FindObjectWithTag("head").transform; }
void update() { headEnemy.LookAt(target.position); }
Answer by MadDevil · Oct 07, 2015 at 11:33 AM
try using the late update.
The enemy is already using the animator object for his walking and a bit for his face movement, but i am trying to let him look at the target while he is in a range, so if the target jump he has to watch him jumping basically. If i disconnect the animator it works fine. But I need the animation
if you are using mecanim and the animations are humaniod, you can use I$$anonymous$$ to make him look at the target.
http://docs.unity3d.com/$$anonymous$$anual/Inverse$$anonymous$$inematics.html
Your answer
Follow this Question
Related Questions
Problem with Jump Animation 0 Answers
Can you improve my animation/movement code? *Bugs in details 1 Answer
Walking around 2D planets? 1 Answer
Increase attack speed and animations 1 Answer