eulerjs API / @eulerjs/core / ColliderOptions
ColliderOptions
Defined in: packages/core/src/colliders/Collider.ts:16
Extended by
BoxColliderOptionsCapsuleColliderOptionsCylinderColliderOptionsConeColliderOptionsHeightfieldColliderOptionsSphereColliderOptionsConvexColliderOptionsMeshColliderOptions
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
collidesWith? | number | Bit mask of the groups it collides with. Defaults to every group. | packages/core/src/colliders/Collider.ts:37 |
collisionGroups? | number | Bit mask of the groups this collider is in. Defaults to group 1. | packages/core/src/colliders/Collider.ts:35 |
friction? | number | Coulomb friction coefficient. Two colliders use the geometric mean of theirs. Defaults to 0.5. | packages/core/src/colliders/Collider.ts:22 |
offset? | Vector3 | Where the collider sits in its body's frame. Defaults to the origin. | packages/core/src/colliders/Collider.ts:18 |
restitution? | number | Bounciness, 0 (none) to 1 (perfectly elastic). Two colliders use the larger. Defaults to 0. | packages/core/src/colliders/Collider.ts:24 |
rollingResistance? | number | Resistance to rolling, as a share of the load: a ball, capsule, cylinder or cone rolling on this, or this one rolling, is held back by a torque of at most this times the contact force times its radius, and so is one spinning on the spot. Two colliders use the larger. Defaults to ROUND_ROLLING_RESISTANCE (0.02) for those round shapes, which come to rest after rolling a while, and to 0 for the others; 0 on a round shape rolls it for ever. About 0.002 for steel on steel, 0.01 for a ball on a hard floor, 0.05 or more for something soft. | packages/core/src/colliders/Collider.ts:33 |
rotation? | Quaternion | How the collider is turned in its body's frame. | packages/core/src/colliders/Collider.ts:20 |
sensor? | boolean | A sensor detects what overlaps it, reporting it through the world's sensorEnter and sensorExit events, without pushing anything: a trigger volume, such as a finish line or a pickup. Defaults to false. | packages/core/src/colliders/Collider.ts:43 |
