Transforms – Unity
Transform.LookAt public void LookAt(Transform target, Vector3 worldUp = Vector3.up); Rotates the transform so the forward vector points at /target/’s current position. Then it rotates the transform to point its up direction vector in the direction hinted at by the worldUp vector. If you leave out the worldUp parameter, the function will use the world y axis. So if I want the gameObject to … Read more