Product media placeholder
Replace this area with a screenshot or short walkthrough video during the media sweep.
F379 — continuous force field acting on a fleet of bodies each frame, computed from each body's distance to a moving (or static) field centre. Replaces JS-spring CSS effects (e.g. `cursorProximityWrite`) when targets are physics-bound elements: keeps everything inside ONE physics simulation, so cursor pushes and ball impacts compose cleanly through the engine instead of fighting at the CSS layer.
Inputs
| Port | Type | Description |
|---|---|---|
world | any | World |
bodyIds | floatArray | Fleet to act on. Wire from `physicsStaticBodyEach.bodyIds` or `physicsBodyStagger.bodyIds`. |
centerX | float | Field source x. Viewport coords when `frameSelector` is set; otherwise body coords. Wire `pointer.x` for a cursor-driven field. |
centerY | float | Center Y (px) |
enabled | float | Enabled |
Outputs
| Port | Type | Description |
|---|---|---|
| - | - | No ports declared. |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | enum | "repel" | Mode options repel, attract |
radius | float | 200 | Effective range. Bodies further than this from the centre receive zero force. min 0; step 10 |
strength | float | 50 | Peak force magnitude at the centre. Decays to 0 at the radius edge per `falloff`. Tune with respect to body density × mass. step 5 |
falloff | enum | "linear" | Falloff options linear, inverse, inverseSquare |
frameSelector | string | "" | Optional CSS selector for viewport→body coord transform on `centerX/Y`. Set when wiring raw `pointer.x/y` so the field centre tracks the visible cursor in the world's coord space. Leave empty when `centerX/Y` are sourced from another physics body or already in body coords. |
motionGateMinSpeed | float | 0 | When > 0, the field stops applying force whenever the centre's frame-to-frame speed drops below this threshold. Mitigates iterative-solver creep — sustained force on a stack of bodies pinned against a corner will eventually squeeze them through walls; gating on cursor motion lets the user stop creeping by simply holding still. 0 = always-on (original behaviour, fine for non-stacked scenes). 50 px/s = "broom" feel: silent when cursor is held, alive when it moves. Use 0 if the field is a magnet on a static scene where you want force even when the cursor is parked. min 0; step 10 |
Use cases
- Cursor repulsor — wire `pointer.x/y → centerX/centerY`, `physicsStaticBodyEach.bodyIds → bodyIds`, set `mode: repel`, `radius: 200`. Cursor pushes letters/cards/grid items away with smooth falloff.
- Magnetic cursor — same wiring, `mode: attract`, `falloff: inverse`. Bodies suck toward cursor; pair with a stiff spring tether for snap-back.
- Static gravity well — `centerX/Y` driven by literal coords (not pointer). Bodies orbit / fall toward the well.
- Ball-pit nudge — multiple force fields (one per cursor / one per touch point) target the same body fleet; their contributions stack additively at the physics layer.
Related nodes
Envelope
Use physicsForceField as the node type inside a graph node envelope. Add id, optional params, optional connections, and optional activeWhen based on the guide context.
Generated source
Registry faster-motion-docs/node-registry.jsonCategory page /help/faster-motion/faster-motion-node-category-solvers/