ChainShape Class

Chain shape for smooth static terrain. Points are in local body space. Chain shapes do not support triggers, bullet mode, mass, or non-Static body types.

Sensor limitation: Box2D only generates sensor/trigger events when a sensor shape overlaps a non-sensor shape. Two IsTrigger bodies will never fire trigger events with each other.

Contact event volume: each segment of a chain shape is an independent Box2D shape. On long terrain chains, a fast-moving body can simultaneously touch many segments, generating a proportional number of contact events per fixed-update tick. Keep chain point density reasonable for sections where dynamic bodies travel.

public sealed record ChainShape : Brine2D.Physics.ShapeDefinition, System.IEquatable<Brine2D.Physics.ChainShape>

Inheritance System.ObjectShapeDefinition → ChainShape

Implements System.IEquatable<ChainShape>

Properties
SegmentMaterials Per-segment surface materials. When non-null, length must equal the segment count: Points.Length - 1 for open chains, Points.Length for loops. When null, every segment inherits SurfaceFriction and Restitution from the owning body.