eulerjs API / @eulerjs/core / HeightfieldColliderOptions
HeightfieldColliderOptions
Defined in: packages/core/src/colliders/HeightfieldCollider.ts:7
Extends
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
cellDepth? | number | Distance between neighbouring rows, along z, where it isn't cellSize. | - | packages/core/src/colliders/HeightfieldCollider.ts:17 |
cellSize | number | Distance between neighbouring points along x, and along z too unless cellDepth is given. | - | packages/core/src/colliders/HeightfieldCollider.ts:15 |
collidesWith? | number | Bit mask of the groups it collides with. Defaults to every group. | ColliderOptions.collidesWith | packages/core/src/colliders/Collider.ts:37 |
collisionGroups? | number | Bit mask of the groups this collider is in. Defaults to group 1. | ColliderOptions.collisionGroups | packages/core/src/colliders/Collider.ts:35 |
friction? | number | Coulomb friction coefficient. Two colliders use the geometric mean of theirs. Defaults to 0.5. | ColliderOptions.friction | packages/core/src/colliders/Collider.ts:22 |
heights | readonly (readonly number[])[] | Heights of the ground at evenly spaced points, along the collider's y axis: heights[row][column], rows running along z and columns along x. Every row needs the same number of columns, and there must be at least two of each. | - | packages/core/src/colliders/HeightfieldCollider.ts:13 |
offset? | Vector3 | Where the collider sits in its body's frame. Defaults to the origin. | ColliderOptions.offset | packages/core/src/colliders/Collider.ts:18 |
restitution? | number | Bounciness, 0 (none) to 1 (perfectly elastic). Two colliders use the larger. Defaults to 0. | ColliderOptions.restitution | 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. | ColliderOptions.rollingResistance | packages/core/src/colliders/Collider.ts:33 |
rotation? | Quaternion | How the collider is turned in its body's frame. | ColliderOptions.rotation | 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. | ColliderOptions.sensor | packages/core/src/colliders/Collider.ts:43 |
thickness? | number | How deep below its lowest point the terrain counts as solid, so that whatever sinks into it, however far, is still pushed back out of the top. Defaults to 1 m. | - | packages/core/src/colliders/HeightfieldCollider.ts:22 |
