Difference between revisions of "LlGetLocalPos"

From Second Life Wiki
Jump to navigation Jump to search
Line 27: Line 27:
|notes
|notes
|cat1=Movement
|cat1=Movement
|cat2
|cat2=Prim
|cat3
|cat3=Object
|cat4
|cat4
}}
}}

Revision as of 08:00, 12 January 2008

Summary

Function: vector llGetLocalPos( );
0.0 Forced Delay
10.0 Energy

Returns a vector that is the position relative (local) to the root.

If called from the root prim it returns the position in the region unless it is attached to which it returns the position relative to the attach point.

Examples

Useful Snippets

There is no llSetLocalPos function. To set the position of a root prim local to itself you would have to do something like:

SetLocalPosition(vector local_position)
{
   vector root_position = llGetPos();
   vector absolute_position = root_position + local_position;
   llSetPos(absolute_position);
}

Deep Notes

Signature

function vector llGetLocalPos();