SHOW:
|
|
- or go back to the newest paste.
1 | float angle = 90; //change to whatever angle you need. | |
2 | ||
3 | integer prim_number = 1; // change to whatever prim number you need to rotate | |
4 | ||
5 | float spinrate = 1.0; // change spin rate | |
6 | ||
7 | float gain = 1.0 // change gain | |
8 | ||
9 | default | |
10 | { | |
11 | - | state_entry() |
11 | + | state_entry() |
12 | { | |
13 | ||
14 | - | Vector RootAxis = llRot2Euler( llGetRootRotation()); |
14 | + | Vector RootAxis = llRot2Euler( llGetRootRotation()); |
15 | ||
16 | - | angle = angle * DEG_TO_RAD; |
16 | + | angle = angle * DEG_TO_RAD; |
17 | ||
18 | - | rotation rot = llAxisAngle2Rot(RootAxis, angle); |
18 | + | rotation rot = llAxisAngle2Rot(RootAxis, angle); |
19 | ||
20 | - | vector euler = llRot2Euler(rot) * RAD_TO_DEG; |
20 | + | vector euler = llRot2Euler(rot) * RAD_TO_DEG; |
21 | ||
22 | - | llSetLinkPrimitiveParamsFast(prim_number,[euler,spinrate,gain]); |
22 | + | llSetLinkPrimitiveParamsFast(prim_number,[euler,spinrate,gain]); |
23 | - | } |
23 | + | } |
24 | } |