Hello there, I am trying to make a simple enemy that looks and chases the player with a constant velocity using Rigidbody ForceMode.VelocityChange, at the begining it works well but for some reason the enemy follows another direction, what am I doing wrong?!
ex:
var velo = 1.0;
function FixedUpdate () {
var Player = gameObject.FindWithTag("Player").transform;
transform.LookAt(Vector3(Player.position.x,transform.position.y,Player.position.z));
rigidbody.AddRelativeForce(transform.forward * velo, ForceMode.VelocityChange);
}