Difference between revisions of "LlGetRootRotation"

From Second Life Wiki
Jump to: navigation, search
(Added example and note about attached objects)
Line 1: Line 1:
{{LSL_Function
+
{{Issues/VWR-1331}}{{LSL_Function
 
|func_id=269|func_sleep=0.0|func_energy=10.0
 
|func_id=269|func_sleep=0.0|func_energy=10.0
 
|func=llGetRootRotation|return_type=rotation
 
|func=llGetRootRotation|return_type=rotation

Revision as of 03:23, 10 October 2010

Summary

Function: rotation llGetRootRotation( );

Returns a rotation that is the region rotation of the root prim of the object.

Examples

Simple example to set region rotation of child prim in unattached link set <lsl> default {

 state_entry()
 {
   //Rotate 45 degrees about Y-axis
   rotation globalRot = llEuler2Rot(<0.0, 45.0, 0.0> * DEG_TO_RAD);
   llSetLocalRot(globalRot / llGetRootRotation());
 }

}

</lsl>

Notes

In an attached object, returns region rotation of avatar NOT of the object's root prim. See special cases of rotation.

See Also

Functions

•  llGetLocalRot
•  llGetRot

Deep Notes

All Issues

~ Search JIRA for related Issues
   Improve accuracy of avatar's visible rotation

Signature

function rotation llGetRootRotation();