$nav
===== Function: llRezObject =====
llRezObject(string name, vector pos, vector vel, rotation rot, integer param)
Rez an object considering the centre of its bounding box as reference.
**WARNING**
This function has a bug that affects the position of the rezzed object when the rotation of the rezzed object changes, and its use is discouraged. Use $lfn[llRezAtRoot] instead.
===== Parameters =====
=== name ===
The name of the object to rez, as a $lty[string] (must be in the prim's inventory).
=== pos ===
Position (as a $lty[vector] in region coordinates) where to place the centre of the bounding box of the rezzed object, in metres.
=== vel ===
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 ===
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 =====
* 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 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 =====
// 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);
===== Complete examples =====
default
{
state_entry()
{
llRezObject(TODO);
}
}
===== See also =====
* $lfn[llRezAtRoot] is similar, but the $prm[pos] parameter indicates the final position of the root prim, regardless of the bounding box.