Hi, I’m trying to rotate an object placed between two other objects to line up between them.
angle = Vector3.Angle( target.transform.position, trigger.transform.position);
transform.rotation.z = angle * Mathf.Deg2Rad;
But as you can see in the pic the object is not lining up properly. (the green line is a Debug.DrawLine between the two points)
I’m not sure what I’m doing wrong here, does anyone have any ideas?