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); } }