You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

rotation llAxisAngle2Rot(vector axis, float angle)

Returns a rotation resulting from turning over the given axis by the given angle in radians, counter-clockwise when seen from the position the vector points to.

For example, if the vector is `<0, 0, 1>`

and the angle is `60*DEG_TO_RAD`

, it will turn 60 degrees over the Z axis counter-clockwise as seen from above, because the vector points up.

A vector specifying the axis the rotation will turn around.

A float with the rotation angle, expressed in radians.

Returns a rotation that turns over the given axis by the given angle.

// The following example will set "rot" to a rotation that turns 60 degrees // counter-clockwise as seen from above, over the vertical Z axis: rotation rot = llAxisAngle2Rot(<0, 0, 1>, 60*DEG_TO_RAD);

default { state_entry() { llAxisAngle2Rot(1, 2); } }

- llRot2Axis extracts the axis vector of a rotation.
- llRot2Angle extracts the angle of a rotation.

- llRot2Fwd extracts the X axis of a rotation.
- llRot2Left extracts the Y axis of a rotation.
- llRot2Up extracts the Z axis of a rotation.
- llAxes2Rot converts the three axes of an orthonormal basis (the three vectors above) to a rotation.
- llRot2Euler and llEuler2Rot work with Euler angles (the ones the viewer shows).