World:newBoxCollider

Adds a new Collider to the World with a BoxShape already attached.

collider = World:newBoxCollider(x, y, z, width, height, depth)

Arguments

NameTypeDefaultDescription
xnumber0 The x coordinate of the center of the box.
ynumber0 The y coordinate of the center of the box.
znumber0 The z coordinate of the center of the box.
widthnumber1 The total width of the box, in meters.
heightnumberwidth The total height of the box, in meters.
depthnumberwidth The total depth of the box, in meters.

Returns

NameTypeDescription
colliderCollider The new Collider.

See also