LlAxes2Rot
From Second Life Wiki
(Redirected from LSL llAxes2Rot)
| LSL Portal | | | Functions | | | Events | | | Types | | | Operators | | | Constants | | | Flow Control | | | Script Library | | | Tutorials |
Contents |
Description
Function: rotation llAxes2Rot( vector fwd, vector left, vector up );| 17 | Function ID |
| 0.0 | Delay |
| 10.0 | Energy |
Returns a rotation that is defined by the 3 coordinate axes
| • vector | fwd | |||
| • vector | left | |||
| • vector | up |
All three vectors must be mutually orthogonal unit vectors.
Examples
default { state_entry() { vector i = < 1.0, 0.0, 0.0>; vector j = < 0.0, 1.0, 0.0>; vector k = < 0.0, 0.0, 1.0>; rotation rot = llAxes2Rot( j, -i, k ); llSay(0, (string) (llRot2Euler(rot) * RAD_TO_DEG) ); } }
This script displays:
Object: <-0.00000, 0.00000, 90.00000>
which shows that (j, -i, k) is obtained by rotating (i, j, k) 90 degrees around z direction.

