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

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 llRezAtRoot instead.

Parameters

name

The name of the object to rez, as a string (must be in the prim's inventory).

pos

Position (as a 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 vector indicates the initial velocity it should have, in metres per second. If it's not physical, this parameter is ignored.

rot

The rotation that the object will have when rezzed.

param

Parameter (an integer) to pass to the child. The child can read this parameter using llGetStartParameter() or the param of the 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 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 SVC-6578). If the rez rotation 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 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

See also

  • llRezAtRoot is similar, but the pos parameter indicates the final position of the root prim, regardless of the bounding box.