Class: BoxColliderShape
Box shaped collision body. It is a basic box shaped primitive collision body.
Hierarchy
↳
BoxColliderShape
Constructors
Accessors
Methods
Constructors
constructor
• new BoxColliderShape(): BoxColliderShape
Returns
Overrides
Defined in
src/components/shape/BoxColliderShape.ts:20
Accessors
shapeType
• get shapeType(): ColliderShapeType
Returns
Inherited from
ColliderShape.shapeType
Defined in
src/components/shape/ColliderShape.ts:40
center
• get center(): Vector3
The position of the collision object in the local space of the object.
Returns
Inherited from
ColliderShape.center
Defined in
src/components/shape/ColliderShape.ts:59
• set center(value): void
Parameters
| Name | Type |
|---|---|
value | Vector3 |
Returns
void
Inherited from
ColliderShape.center
Defined in
src/components/shape/ColliderShape.ts:63
size
• get size(): Vector3
The size of the collision body in the X, Y, and Z directions.
Returns
Vector3
Inherited from
ColliderShape.size
Defined in
src/components/shape/ColliderShape.ts:72
• set size(value): void
Parameters
| Name | Type |
|---|---|
value | Vector3 |
Returns
void
Inherited from
ColliderShape.size
Defined in
src/components/shape/ColliderShape.ts:76
halfSize
• get halfSize(): Vector3
Half the size of the collision body.
Returns
Inherited from
ColliderShape.halfSize
Defined in
src/components/shape/ColliderShape.ts:84
Methods
setFromCenterAndSize
▸ setFromCenterAndSize(ct?, sz?): this
Set the position and size of collision objects
Parameters
| Name | Type | Description |
|---|---|---|
ct? | Vector3 | The position of the collision object in the local space of the object. |
sz? | Vector3 | The size of the collision body in the X, Y, and Z directions. |
Returns
this
Inherited from
ColliderShape.setFromCenterAndSize

