How to Make NPC Face Player
Hello I have a state called Attack and the NPC will attack the player. One of the NPC will shoot at the player but not face the player direction therefore the bullets are easy to evade.
This is what I have so far: Vector3 delta = new Vector3(target.transform.position.y - npc.transform.position.y, 0.0f); Quaternion rotation = Quaternion.LookRotation(delta); npc.transform.rotation = rotation;
But nothing works?
Your answer
Follow this Question
Related Questions
How to Make NPC Rotate Towards the Player With the Bullets Being Rotated as Well. 0 Answers
3D, Rotate gun towards mouse 0 Answers
How to clamp rotation of multi-rotation constraint (Animation Rigging) 0 Answers
How to fix turret rotation offest by 90 degrees 2 Answers
Make Prefab Rotate Depending on a different Game Object's Rotation. 0 Answers