llRot2Axis

From Second Life Wiki
Jump to navigation Jump to search

Summary

Function: vector llRot2Axis( rotation rot );
0.0 Forced Delay
10.0 Energy

Returns a vector the rotation axis represented by rot

• rotation rot

Use in conjunction with llRot2Angle.
To undo use llAxisAngle2Rot.

Examples

<lsl>default {

   state_entry()
   {
       rotation rTest=llAxisAngle2Rot(<0.0, 0.0, 1.0>, (90.0*DEG_TO_RAD));
       vector eTest=llRot2Euler(rTest)*RAD_TO_DEG;
       llOwnerSay((string) eTest);
       //Says <0.0, 0.0, 90.0> since it is rotating 90 degrees on the Z axis caused by the 1.0 placed in the Z vector spot. 
   }
}</lsl>

See Also

Functions

•  llRot2Angle
•  llAxisAngle2Rot
•  llRot2Left
•  llRot2Fwd
•  llRot2Up

Articles

•  Slerp

Deep Notes

Signature

function vector llRot2Axis( rotation rot );