LlGetLocalPos
From Second Life Wiki
| LSL Portal | | | Functions | | | Events | | | Types | | | Operators | | | Constants | | | Flow Control | | | Script Library | | | Tutorials |
Function: vector llGetLocalPos( );
| 60 | Function ID |
| 0.0 | 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
default( touch_start( integer vIntTouched ) string vStrMessage = "The touched prim is "; if (llDetectedLinkNumber( 0 ) > 1){ vStrMessage += (string)llVecMag( llGetLocalPos() ) + "m from " } llSay( 0, vStrMessage + "the root prim" ); } }
See Also
Functions
| • | llGetRootPosition | – | Gets the root prims global position | |
| • | llGetPos | – | Gets the prims global position | |
| • | llSetPos | – | Sets the prims gloabl position |

