Hello everyone, i have a 3d arrow in my game and i want it to be pointing to my enemy all the time. Initially i was using a simple lookat(enemy) in a script applied to my arrow, but instead of rotating it, it is actually deforming the mesh which is horrible… How can I fix the script ahead to make it to what i want?
Thanks everyone…
var enemy: Transform;
function Update () {
var difference : Vector3 = enemy.transform - transform ;
transform.rotation = Quaternion .LookRotation (difference.normalized );
// This line ahed was my old version which distorts my arrow :(
//transform.LookAt(enemy);
}