The shape of the collider being built.
Set the collision types active for this collider.
The hooks active for contact/intersection pairs involving this collider.
Set the events active for this collider.
Use this to enable contact and/or intersection event reporting for this collider.
The events active for contact/intersection pairs involving this collider.
Set the physics hooks active for this collider.
Use this to enable custom filtering rules for contact/intersecstion pairs involving this collider.
The hooks active for contact/intersection pairs involving this collider.
Sets the collision groups used by this collider.
Two colliders will interact iff. their collision groups are compatible.
See the documentation of InteractionGroups
for details on teh used bit pattern.
The collision groups used for the collider being built.
Sets the total force magnitude beyond which a contact force event can be emitted.
The force threshold to set.
Sets the contact skin of the collider.
The contact skin acts as if the collider was enlarged with a skin of width skin_thickness
around it, keeping objects further apart when colliding.
A non-zero contact skin can increase performance, and in some cases, stability. However it creates a small gap between colliding object (equal to the sum of their skin). If the skin is sufficiently small, this might not be visually significant or can be hidden by the rendering assets.
Sets the density of the collider being built.
The mass and angular inertia tensor will be computed automatically based on this density and the collider’s shape.
The density to set, must be greater or equal to 0. A density of 0 means that this collider will not affect the mass or angular inertia of the rigid-body it is attached to.
Sets whether the created collider will be enabled or disabled.
− If set to false
the collider will be disabled at creation.
Sets the friction coefficient of the collider to be created.
The friction coefficient. Must be greater or equal to 0. This is generally smaller than 1. The higher the coefficient, the stronger friction forces will be for contacts with the collider being built.
Sets the rule used to combine the friction coefficients of two colliders colliders involved in a contact.
− The combine rule to apply.
Sets the mass of the collider being built.
The angular inertia tensor will be computed automatically based on this mass and the collider’s shape.
The mass to set, must be greater or equal to 0.
Sets the mass properties of the collider being built.
This replaces the mass-properties automatically computed from the collider's density and shape. These mass-properties will be added to the mass-properties of the rigid-body this collider will be attached to.
− The mass of the collider to create.
− The center-of-mass of the collider to create.
− The initial principal angular inertia of the collider to create. These are the eigenvalues of the angular inertia matrix.
− The initial local angular inertia frame of the collider to create. These are the eigenvectors of the angular inertia matrix.
Sets the restitution coefficient of the collider to be created.
The restitution coefficient in [0, 1]
. A value of 0 (the default) means no bouncing behavior
while 1 means perfect bouncing (though energy may still be lost due to numerical errors of the
constraints solver).
Sets the rule used to combine the restitution coefficients of two colliders colliders involved in a contact.
− The combine rule to apply.
Sets the rotation of the collider to be created relative to the rigid-body it is attached to.
The rotation of the collider to be created relative to the rigid-body it is attached to.
Sets whether or not the collider being created is a sensor.
A sensor collider does not take part of the physics simulation, but generates proximity events.
Set to true
of the collider built is to be a sensor.
Sets the solver groups used by this collider.
Forces between two colliders in contact will be computed iff their solver
groups are compatible.
See the documentation of InteractionGroups
for details on the used bit pattern.
The solver groups used for the collider being built.
Sets the position of the collider to be created relative to the rigid-body it is attached to.
Static
ballCreate a new collider descriptor with a ball shape.
The radius of the ball.
Static
capsuleCreate a new collider descriptor with a capsule shape.
The half-height of the capsule, along the y
axis.
The radius of the capsule basis.
Static
coneCreate a new collider descriptor with a cone shape.
The half-height of the cone, along the y
axis.
The radius of the cone basis.
Static
convexComputes the convex-hull of the given points and use the resulting convex polyhedron as the shape for this new collider descriptor.
The point that will be used to compute the convex-hull.
Static
convexCreates a new collider descriptor that uses the given set of points assumed to form a convex polyline (no convex-hull computation will be done).
The vertices of the convex polyline.
Optional
indices: Uint32ArrayStatic
cuboidCreates a new collider descriptor with a cuboid shape.
The half-width of the rectangle along its local x
axis.
The half-width of the rectangle along its local y
axis.
The half-width of the rectangle along its local z
axis.
Static
cylinderCreate a new collider descriptor with a cylinder shape.
The half-height of the cylinder, along the y
axis.
The radius of the cylinder basis.
Static
heightfieldCreates a new collider descriptor with a heightfield shape.
− The number of rows in the heights matrix.
The number of columns in the heights matrix.
The heights of the heightfield along its local y
axis,
provided as a matrix stored in column-major order.
The scale factor applied to the heightfield.
Optional
flags: FIX_INTERNAL_EDGESStatic
polylineCreates a new collider descriptor with a polyline shape.
The coordinates of the polyline's vertices.
Optional
indices: Uint32ArrayThe indices of the polyline's segments. If this is undefined
or null
,
the vertices are assumed to describe a line strip.
Static
roundCreate a new collider descriptor with a cone shape with rounded corners.
The half-height of the cone, along the y
axis.
The radius of the cone basis.
The radius of the cone's rounded edges and vertices.
Static
roundComputes the convex-hull of the given points and use the resulting convex polyhedron as the shape for this new collider descriptor. A border is added to that convex polyhedron to give it round corners.
The point that will be used to compute the convex-hull.
The radius of the round border added to the convex polyhedron.
Static
roundCreates a new collider descriptor that uses the given set of points assumed to form a round convex polyline (no convex-hull computation will be done).
The vertices of the convex polyline.
The radius of the round border added to the convex polyline.
Static
roundCreates a new collider descriptor with a rectangular shape with round borders.
The half-width of the rectangle along its local x
axis.
The half-width of the rectangle along its local y
axis.
The half-width of the rectangle along its local z
axis.
The radius of the cuboid's borders.
Static
roundCreate a new collider descriptor with a cylinder shape with rounded corners.
The half-height of the cylinder, along the y
axis.
The radius of the cylinder basis.
The radius of the cylinder's rounded edges and vertices.
Static
roundCreates a new triangle shape with round corners.
Static
segmentCreates a new segment shape.
Static
triangleCreates a new triangle shape.
Static
trimeshCreates a new collider descriptor with a triangle mesh shape.
The coordinates of the triangle mesh's vertices.
The indices of the triangle mesh's triangles.
Optional
flags: TriMeshFlagsGenerated using TypeDoc
Initializes a collider descriptor from the collision shape.