Collider class
This class encapsulates the physics entities attached to a component (rigid body, collider).
it offers some convenience methods to physics properties of the component.
For more info on the underlying physics engine, cf Rapier docs (opens in a new tab)
Signature:
export declare class Collider
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Collider
class.
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
RapierCollider |
Rapier collider instance, cf Rapier docs (opens in a new tab) for more info | ||
ColliderDesc |
Collider description, cf Rapier docs (opens in a new tab) for more info | ||
Collider type, cf Rapier docs (opens in a new tab) for more info on the meaning of different types | |||
|
Returns the component this collider is attached to | ||
boolean |
Returns the enabled state of the rigidbody | ||
[boolean, boolean, boolean] |
Returns the current rotation lock state | ||
[boolean, boolean, boolean] |
Returns the current translation lock state | ||
|
boolean | ||
string |
Component's name this collider is attached to | ||
RigidBody |
Rapier rigid body instance, cf Rapier docs (opens in a new tab) for more info | ||
Rigid body type, cf Rapier docs (opens in a new tab) for more info on the meaning of different types |