LlSetLocalRot

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Function: llSetLocalRot( rotation rot );
284 Function ID
0.2 Delay
10.0 Energy

Sets the rotation of a child prim relative to the root prim

• rotation rot

Caveats

  • This function causes the script to sleep for 0.2 seconds.

Search JIRA for related Bugs

Examples

Drop this script in a prim* to rotate it in 1 degree increments. *This prim must be attached as child of a root prim.

rotation rot_xyzq;
 
default
{
    state_entry()
    {
        vector xyz_angles = <0,1.0,0>; // This is to define a 1 degree change
        vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians
        rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation
    }
 
    touch_start(integer s)
    {
        llSetLocalRot(llGetRot()*rot_xyzq); //Do the Rotation...
 
    }
}

See Also

Functions

•  llSetRot
•  llGetRot
•  llGetLocalRot
•  llGetRootRotation

Deep Notes

This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
Personal tools
In other languages