MotorJointComponent Class

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.

public sealed class MotorJointComponent : Brine2D.ECS.Components.Joints.JointComponent

Inheritance System.ObjectComponentJointComponent → MotorJointComponent

Properties
AngularOffset Target angular offset of body B relative to body A in radians.
CorrectionFactor Position correction factor in [0, 1]. Higher values correct error faster but can cause instability. Default is 0.3.
LinearOffset Target linear offset of body B relative to body A in pixels.
MaxForce Maximum force used to reach the linear target (Newtons).
MaxTorque Maximum torque used to reach the angular target (N·m).