Raytracer:set

Edit

Moves a Mesh or Model to the Raytracer, using an ID previously returned by Raytracer:add. This function can also change the layer mask and tag of the object.

After adding and moving objects, call Raytracer:build to finalize the raytracer.




Arguments

NameTypeDefaultDescription
idnumber The ID of the object to change.
xnumber0 The x coordinate to place the object at.
ynumber0 The y coordinate to place the object at.
znumber0 The z coordinate to place the object at.
scalenumber1 The scale of the object.
anglenumber0 The rotation of the object around its rotation axis, in radians.
axnumber0 The x component of the axis of rotation.
aynumber1 The y component of the axis of rotation.
aznumber0 The z component of the axis of rotation.
layersnumbernil The new layer mask for the object, or nil to leave it unchanged.
tagnumbernil The new tag for the object, or nil to leave it unchanged.

Returns

Nothing

Arguments

NameTypeDefaultDescription
idnumber The ID of the object to change.
positionvector The position to place the object at.
scale3vector The scale of the object.
orientationquaternion The orientation of the object.
layersnumbernil The new layer mask for the object, or nil to leave it unchanged.
tagnumbernil The new tag for the object, or nil to leave it unchanged.

Returns

Nothing

Arguments

NameTypeDefaultDescription
idnumber The ID of the object to change.
transformMat4 The transform of the object.
layersnumbernil The new layer mask for the object, or nil to leave it unchanged.
tagnumbernil The new tag for the object, or nil to leave it unchanged.

Returns

Nothing

See also