Difference between revisions of "LlRot2Axis"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples | |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> | |||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow||[[llRot2Angle]]}} | |also_functions={{LSL DefineRow||[[llRot2Angle]]}} |
Revision as of 17:53, 10 April 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: vector llRot2Axis( rotation rot );170 | Function ID |
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.
Caveats
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>