Skip to content

Joints

Brine2D

Brine2D.ECS.Components.Joints Namespace

Classes
DistanceJointComponent Constrains the distance between two anchor points to a target length. Supports a spring, translation limits, and a linear motor.
JointComponent Base class for all physics joint components. Place this component on the entity that acts as body A. Set ConnectedBody to the other body (body B). The joint is created by Box2DPhysicsSystem once both bodies have live Box2D bodies, and destroyed automatically when this component is removed or either body is destroyed.
MotorJointComponent Drives body B toward a target position and angle relative to body A using forces and torques. Useful for AI-controlled characters, moving platforms, and procedural animation. Unlike other joints, anchors are not used — the motor acts on the body centers directly.
MouseJointComponent Pulls body B toward a world-space target point using a soft spring force. Ideal for click-to-drag interactions and soft positional control. Body A is typically a static ground body; body B is the body being pulled.
PrismaticJointComponent Constrains two bodies to slide along a local axis while preventing relative rotation. Supports translation limits, a linear motor, and a spring. LocalAnchorA and LocalAnchorB are the anchor points on each body.
RevoluteJointComponent Constrains two bodies to share a common anchor point, allowing relative rotation. Supports angle limits, a rotational motor, and a spring. LocalAnchorA and LocalAnchorB define the pivot point on each body.
WeldJointComponent Locks two bodies together at a shared anchor with optional spring softness. A rigid weld (LinearHertz = 0) is equivalent to merging the two bodies.
WheelJointComponent Models a vehicle wheel: body B translates along a local axis on body A and can rotate freely. Supports suspension spring, translation limits, and a spin motor.