World:newBoxCollider

Edit

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



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.

Arguments

NameTypeDescription
positionVec3 The position of the center of the box, in meters.
sizeVec3 The size of the box, in meters.

Returns

NameTypeDescription
colliderCollider The new Collider.

See also