Shape
A shape attached to a body. Shapes define the collision geometry and physical properties.
Properties
Are contact events enabled for this shape?
Are hit events enabled for this shape?
Are pre-solve events enabled for this shape?
Are sensor events enabled for this shape?
Get the contact capacity for this shape.
The restitution (bounciness) of this shape.
Get the sensor overlap capacity.
The surface material properties.
Functions
Enable or disable contact events for this shape.
Enable or disable hit events for this shape.
Enable or disable pre-solve events for this shape.
Enable or disable sensor events for this shape.
Get the capsule geometry. Only valid if type is Capsule.
Get the chain segment for this shape. Only valid if type is ChainSegment.
Get the closest point on this shape to the given target point.
Get contact data for this shape.
Get the mass data for this shape based on its geometry and density.
Get the parent chain for this shape, or null if not part of a chain.
Get the polygon geometry. Only valid if type is Polygon.
Get the segment geometry. Only valid if type is Segment.
Get the shapes overlapping with this sensor. Only valid for sensors.
Cast a ray against this shape.
Set the capsule geometry. Only valid if type is Capsule.
Set the density with control over body mass update.
Set the polygon geometry. Only valid if type is Polygon.
Set the segment geometry. Only valid if type is Segment.