MouseJointComponent Class
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.
public sealed class MouseJointComponent : Brine2D.ECS.Components.Joints.JointComponent
Inheritance System.Object ā Component ā JointComponent ā MouseJointComponent
| Properties | |
|---|---|
| DampingRatio | Spring damping ratio (0 = undamped, 1 = critically damped). Default is 0.7. |
| Hertz | Spring frequency in Hz. Higher values make the spring stiffer. Default is 5. |
| MaxForce | Maximum force the joint can exert in pixels/s². Must be >= 0. |
| Target | World-space target point in pixel coordinates. Update this every fixed-update frame to drag the connected body. |