Unofficial LSL Reference

[[functions:llrezobject]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

functions:llrezobject [2020-05-28 02:41 SLT]
sei created (WIP)
functions:llrezobject [2020-05-28 03:10 SLT] (current)
sei fix filename
Line 20: Line 20:
  
 === pos === === pos ===
-Position (as a $lty[vector] in region coordinates) where to place the centre of the bounding box of the rezzed object.+Position (as a $lty[vector] in region coordinates) where to place the centre of the bounding box of the rezzed object, in metres.
  
 === vel === === vel ===
-If the object to rez is physical, this $lty[vector] indicates the initial velocity it should have. If it's not physical, this parameter is ignored.+If the object to rez is physical, this $lty[vector] indicates the initial velocity it should have, in metres per second. If it's not physical, this parameter is ignored
 + 
 +=== rot === 
 +The $lty[rotation] that the object will have when rezzed.
  
 === param === === param ===
-Parameter to pass to the child. The child can read this parameter using $lfn[llGetStartParameter]() or the $prm[param] of the $lev[on_rez] event.+Parameter ​(an $lty[integer]) ​to pass to the child. The child can read this parameter using $lfn[llGetStartParameter]() or the $prm[param] of the $lev[on_rez] event.
  
 ===== Notes ===== ===== Notes =====
  
   * The reference point for the rez position is the centre the bounding box of the child linkset.   * The reference point for the rez position is the centre the bounding box of the child linkset.
-    * Note however, that the rez rotation $prm[rot] is not taken into account when calculating the position of the root, but the original rotation when the object was taken is (bug $JIRA[SVC-6578]). If the rez rotation $prm[rot] is different from the rotation of the object when it was taken, this bug will happen, resulting in the centre of the bounding box not ending up in the specified position $prm[pos].+    * Note however, that the rez rotation $prm[rot] is not taken into account when calculating the position of the root of the rezzed object, but the original rotation when the object was taken is (bug $JIRA[SVC-6578]). If the rez rotation $prm[rot] is different from the rotation of the object when it was taken, this bug will happen, resulting in the centre of the bounding box not ending up in the specified position $prm[pos].
  
 ===== Short examples ===== ===== Short examples =====
  
 <code lsl2> <code lsl2>
-llRezObject("​Bullet",​ llGetPos(), ); // will do xxx+// Rez an object called Bullet 1m away from the current position in the X direction,​ 
 +// with velocity of 20 m/s in the X direction and no rotation, and with a parameter of 1 
 +llRezObject("​Bullet",​ llGetPos() ​+ <1,0,0>, <20, 0, 0>, ZERO_ROTATION,​ 1);
 </​code>​ </​code>​
  
 ===== Complete examples ===== ===== Complete examples =====
  
-<file lsl2 llrezobject-example.lsl>​+<file lsl2 llRezObject-example.lsl>​
 default default
 { {
     state_entry()     state_entry()
     {     {
-        llRezObject(1, 2);+        llRezObject(TODO);
     }     }
 } }
Line 53: Line 58:
 ===== See also ===== ===== See also =====
  
-  * $lfn[llRezAtRoot] ​does such and such+  * $lfn[llRezAtRoot] ​is similar, but the $prm[pos] parameter indicates the final position of the root prim, regardless of the bounding box.