Class: Collider
WebSG.Collider
The Collider class represents a shape that can be used for collision detection in a physics simulation.
Table of contents
Constructors
Constructors
constructor
• new Collider(props
)
Creates a new Collider instance with the specified properties.
Example
ts
// Create a new box Collider
const collider = world.createCollider({
type: ColliderType.Box,
size: [1, 1, 1],
});
Parameters
Name | Type | Description |
---|---|---|
props | ColliderProps | The properties of the Collider. |