For some reason when I apply this script to my turret:
var LookAtTarget:Transform;
var damp = 1.0;
function Update ()
{
if(LookAtTarget)
{
var rotate = Quaternion.LookRotation(LookAtTarget.position - transform.position);
transform.rotation = Quaternion.Slerp(transform.rotation, rotate, Time.deltaTime * damp);
}
//transform.LookAt(LookAtTarget);
}
It pushes any other objects nearby away, floats around, and when I get near it with the target it is tracking it floats up higher until I get farther away. I have trolled around looking for this exact problem and have not found any solutions posted to this question, I am fairly new to unity so I am certain it is just some stupid setting I am not familiar with. I have messed with rigidbody and other gravity settings trying to get something to work, but the object doesn’t pay any attention to my feeble attempts.
Any suggestions are much appreciated!