So i’ve tried this using quaternion/Slerp/Vectore 3, but it hasn’t worked out well for me…
So basically i have a player, this player is going to be chased by a NPC (the npc will constantly rotate towards them and move towards them as the player moves) The problem i have is that when i have my player that’s being chased jump, the NPC will rotate it’s whole body to face upwards on the Z axis towards me… which i don’t want to happen. (this is 3D btw)
code:
void chase()
{
transform.LookAt (player.position);
controller.SimpleMove(transform.forward*speed);
}
/*chase is called every frame in the update method (making it hard for me to use vectors..*/