Skip to content

eulerjs API / @eulerjs/core / CapsuleColliderOptions

CapsuleColliderOptions ​

Defined in: packages/core/src/colliders/CapsuleCollider.ts:8

Extends ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
collidesWith?numberBit mask of the groups it collides with. Defaults to every group.ColliderOptions.collidesWithpackages/core/src/colliders/Collider.ts:37
collisionGroups?numberBit mask of the groups this collider is in. Defaults to group 1.ColliderOptions.collisionGroupspackages/core/src/colliders/Collider.ts:35
friction?numberCoulomb friction coefficient. Two colliders use the geometric mean of theirs. Defaults to 0.5.ColliderOptions.frictionpackages/core/src/colliders/Collider.ts:22
lengthnumberDistance between the centres of the two rounded ends, along the collider's y axis. 0 makes a sphere.-packages/core/src/colliders/CapsuleCollider.ts:11
offset?Vector3Where the collider sits in its body's frame. Defaults to the origin.ColliderOptions.offsetpackages/core/src/colliders/Collider.ts:18
radiusnumber--packages/core/src/colliders/CapsuleCollider.ts:9
restitution?numberBounciness, 0 (none) to 1 (perfectly elastic). Two colliders use the larger. Defaults to 0.ColliderOptions.restitutionpackages/core/src/colliders/Collider.ts:24
rollingResistance?numberResistance 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.rollingResistancepackages/core/src/colliders/Collider.ts:33
rotation?QuaternionHow the collider is turned in its body's frame.ColliderOptions.rotationpackages/core/src/colliders/Collider.ts:20
sensor?booleanA 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.sensorpackages/core/src/colliders/Collider.ts:43

Released under the MIT License.