I’m making a game with missiles which are going to follow the player. How can I make the missiles point at the player using add force instead of look at because look at looks kinda unrealistic I want it too slowly point towards the player. Any help?
It is possible to use angular velocity to aim an object, but direct rotation is easier. Something like this:
#pragma strict
public var target : Transform;
public var speed : float;
function FixedUpdate() {
var q = Quaternion.LookAt(target.position - transform.position);
rigidbody.MoveRotation(Quaternion.RotateToward(transform.rotation, q, speed * Time.deltaTime));
}
Note if the rotation is too far out of align when you are close, this logic will cause the missile to circle the target.