LlGetLocalPos
De DigiWiki.
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" ); } }
There is no function to set the position of a prim local to itself. To set the position of a prim local to itself you would have to do something like:
SetPositionLocalToCurrentPosition(vector local_position) { llSetPos(llGetLocalPos() + (local_position * llGetLocalRot())); }
Or:
SetPositionLocalToCurrentPosition(vector local_position) { llSetPos(llGetPos() + (local_position * llGetRot())); }