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
xnumber0The x coordinate of the center of the box.
ynumber0The y coordinate of the center of the box.
znumber0The z coordinate of the center of the box.
widthnumber1The total width of the box, in meters.
heightnumberwidthThe total height of the box, in meters.
depthnumberwidthThe total depth of the box, in meters.

Returns

NameTypeDescription
colliderColliderThe new Collider.

See also