<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlGetLocalPos</id>
	<title>LlGetLocalPos - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlGetLocalPos"/>
	<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlGetLocalPos&amp;action=history"/>
	<updated>2026-10-25T11:11:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://wiki.osgrid.org/index.php?title=LlGetLocalPos&amp;diff=149&amp;oldid=prev</id>
		<title>Osgridadmin: Created page with &quot;==Function: vector llGetLocalPos( );== Returns a vector that is the position relative (local) to the root. &lt;br&gt;&lt;br&gt; If called from the root prim it returns the position in the...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlGetLocalPos&amp;diff=149&amp;oldid=prev"/>
		<updated>2017-12-31T22:34:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Function: vector llGetLocalPos( );== Returns a vector that is the position relative (local) to the root. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; If called from the root prim it returns the position in the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Function: vector llGetLocalPos( );==&lt;br /&gt;
Returns a vector that is the position relative (local) to the root. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
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. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Examples&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
  touch_start( integer vIntTouched )&lt;br /&gt;
  {&lt;br /&gt;
    string vStrMessage = &amp;quot;The touched prim is &amp;quot;;&lt;br /&gt;
    if (llDetectedLinkNumber( 0 ) &amp;gt; 1)&lt;br /&gt;
    {&lt;br /&gt;
      vStrMessage += (string)llVecMag( llGetLocalPos() ) + &amp;quot;m from &amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    llSay( 0, vStrMessage + &amp;quot;the root prim&amp;quot; );&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Useful Snippets&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There is no llSetLocalPos function. To set the position of a root prim local to itself you would have to do something like:&amp;lt;br&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
SetLocalPosition(vector local_position)&lt;br /&gt;
{&lt;br /&gt;
   vector root_position = llGetPos();&lt;br /&gt;
   vector absolute_position = root_position + local_position;&lt;br /&gt;
   llSetPos(absolute_position);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See Also &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Functions&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[llGetRootPosition]] 	– 	Gets the root prims global position 	&amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[llGetPos]] 	– 	Gets the prims global position 		&amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[llSetPos]] 	– 	Sets the prims global position	&amp;lt;br&amp;gt;	&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Osgridadmin</name></author>
	</entry>
</feed>