Skip to content

lookat

matrix3  lookat(vector from, vector to)

matrix3  lookat(vector from, vector to, float roll)

matrix3  lookat(vector from, vector to, vector up)

vector  lookat(vector from, vector to, float roll, int xyz)

vector  lookat(vector from, vector to, vector up, int xyz)

Computes a rotation matrix or angles to orient the negative z-axis along the vector (to-from) under the transformation. If an up vector is specified, this will determine the roll.

xyz

One of the rotation order constants listed below, which can be imported from $HFS/houdini/vex/include/math.h.

Constant nameRotation Order
XFORM_XYZRotate order X, Y, Z
XFORM_XZYRotate order X, Z, Y
XFORM_YXZRotate order Y, X, Z
XFORM_YZXRotate order Y, Z, X
XFORM_ZXYRotate order Z, X, Y
XFORM_ZYXRotate order Z, Y, X