|
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:
(comments are locked)
|
|
try using transform.LookAt(Player); instead of that long line alsi use Vector3.forward instead of transform.forward (though it might not make a difference) the script would be: var velo : float = 1.0; If this won't work tell me ;)
(comments are locked)
|

I'm not sure if this'll help, but try changing transform.forward to Vector3.forward. AddRelativeForce already converts the supplied Vector3 to local coordinates and supplying it with a Vector3 already containing local coordinates (i.e., Transform.forward) might be producing unintended output.