Quat.LookAt

static Quat LookAt(Vec3 from, Vec3 to)

   
Vec3 from Where the object is.
Vec3 to Where the object should be looking!
RETURNS: Quat A rotation from resting, to the look direction of the parameters.

Creates a rotation from a resting direction, to a direction indicated by the direction of the two vectors provided to the function! This is a great function for camera style rotation, when you know where a camera is, and where you want to look at. This prevents roll on the Z axis, Up is always (0,1,0).

static Quat LookAt(Vec3 from, Vec3 to, Vec3 up)

   
Vec3 from Where the object is.
Vec3 to Where the object should be looking!
Vec3 up Which direction is up from this perspective?
RETURNS: Quat A rotation from resting, to the look direction of the parameters.

Creates a rotation from a resting direction, to a direction indicated by the direction of the two vectors provided to the function! This is a great function for camera style rotation, when you know where a camera is, and where you want to look at. This prevents roll on the Z axis, Up is always (0,1,0).