eulerjs API / @eulerjs/core / SphereCollider
SphereCollider
Defined in: packages/core/src/colliders/SphereCollider.ts:13
A sphere, centred on the collider's position.
Extends
Constructors
Constructor
ts
new SphereCollider(options): SphereCollider;Defined in: packages/core/src/colliders/SphereCollider.ts:17
Parameters
| Parameter | Type |
|---|---|
options | SphereColliderOptions |
Returns
SphereCollider
Overrides
Properties
Accessors
boundingRadius
Get Signature
ts
get boundingRadius(): number;Defined in: packages/core/src/colliders/SphereCollider.ts:23
Radius of a sphere around the offset that contains the shape; Infinity for infinite shapes.
Returns
number
Overrides
Methods
bounds()
ts
bounds(pose, target): Box3;Defined in: packages/core/src/colliders/SphereCollider.ts:27
World-space box around the collider at pose. Infinite shapes return an infinite box.
Parameters
| Parameter | Type |
|---|---|
pose | ColliderPose |
target | Box3 |
Returns
Box3
Overrides
canCollideWith()
ts
canCollideWith(other): boolean;Defined in: packages/core/src/colliders/Collider.ts:95
Parameters
| Parameter | Type |
|---|---|
other | Collider |
Returns
boolean
Inherited from
massProperties()
ts
massProperties(specification): MassProperties;Defined in: packages/core/src/colliders/SphereCollider.ts:33
Mass properties of the solid in the body frame, or undefined for shapes without a volume.
Parameters
| Parameter | Type |
|---|---|
specification | MassSpecification |
