- Home /
Looking at target problem!!
I have a quadruped 3d model, and it is moving with NavMeshAgent in my scene. Every time I try to make the model look to the target using quartenion.rotatetowards , quartenion.lerp or navmeshagent rotation it turns 90 degrees completely on y , but I just want him rotate a little to look to the target.
What can I do?
Sorry for the bad english i'm Brazilian.
Answer by juicyz · Jan 06, 2017 at 07:27 PM
Is your question is that you want the guy to slowly rotate and look at him? or that the code you have isn't rotating completely?
For the former, you should get your targets coords and what not then rotate the object by an amount and use timeDelta to slowly rotate it. That will likely do what you want. For the latter, you can look at https://docs.unity3d.com/ScriptReference/Transform.LookAt.html