### Closest equivalent to Unity's "LookAt" rotation in

Posted:

**Mon May 27, 2013 6:07 am**Hello all, i'm trying to rotate some vertices in a mesh about a 3D cursor while preserving the up vector.

If I were in Unity I'd use the "LookAt()" function by specifying what I want the object to look at and also specifying the 'worldUp' vector to make the rotation robust for all rotations:

---

from http://docs.unity3d.com/Documentation/S ... ookAt.html

"function LookAt (worldPosition : Vector3, worldUp : Vector3 = Vector3.up) :

Rotates the transform so the forward vector points at worldPosition. 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. worldUp is only a hint vector. The up vector of the rotation will only match the worldUp vector if the forward direction is perpendicular to worldUp. "

---

What would be the closest Blender equivalent to doing "LookAt" rotation?

Thanks for any help! Lost on this one!!

Dan,

If I were in Unity I'd use the "LookAt()" function by specifying what I want the object to look at and also specifying the 'worldUp' vector to make the rotation robust for all rotations:

---

from http://docs.unity3d.com/Documentation/S ... ookAt.html

"function LookAt (worldPosition : Vector3, worldUp : Vector3 = Vector3.up) :

Rotates the transform so the forward vector points at worldPosition. 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. worldUp is only a hint vector. The up vector of the rotation will only match the worldUp vector if the forward direction is perpendicular to worldUp. "

---

What would be the closest Blender equivalent to doing "LookAt" rotation?

Thanks for any help! Lost on this one!!

Dan,