Skip to content

smoothrotation

vector  smoothrotation(int order, vector r, vector r_reference)

Returns the Euler rotations that have the closest values to r_reference while still describing the same orientation as r. Typically, r_reference will be the rotations from the previous sample or frame.

The angles are in radians. Use the radians() function to convert degrees into radians.

order

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