Adds a new Collider to the World with a BoxShape already attached.
Arguments
Name | Type | Default | Description |
x | number | 0 |
The x coordinate of the center of the box.
|
y | number | 0 |
The y coordinate of the center of the box.
|
z | number | 0 |
The z coordinate of the center of the box.
|
width | number | 1 |
The total width of the box, in meters.
|
height | number | width |
The total height of the box, in meters.
|
depth | number | width |
The total depth of the box, in meters.
|
Returns
Name | Type | Description |
collider | Collider |
The new Collider.
|
Arguments
Name | Type | Description |
position | Vec3 |
The position of the center of the box, in meters.
|
size | Vec3 |
The size of the box, in meters.
|
Returns
Name | Type | Description |
collider | Collider |
The new Collider.
|
See also
BoxShape
Collider
World:newCollider
World:newCapsuleCollider
World:newCylinderCollider
World:newMeshCollider
World:newSphereCollider
World