- Home /
follow along the XZ plane?
Hello. How can I have an object follow another object along the ZX plane (not changing its Y position at all), but have it stop when it gets within a certain distance? This is what I have so far:
var player :Transform;
function Update(){
transform.Translate(Vector3.forward * 10 *Time.deltaTime);transform.LookAt(player);
}
(if it helps put it into context, I am trying to get a ship to follow crosshairs in a starfox 64 type game) Thanks
Comment