Help guide

Physics Body node

Updated June 21, 2026

Physics Body node

Product media placeholder

Replace this area with a screenshot or short walkthrough video during the media sweep.

One rigid body in the wired physicsWorld. Dynamic (default) or kinematic (param). Pose, velocity, and awake state are exposed as typed output ports — wire to `domPropertyWrite` for DOM consumers, to STN inputs for canvas consumers, or to `physicsBodyTransform` for fan-out to multiple consumers.

Type physicsBodyCategory solversContext sharedDynamic ports noCompound no

Inputs

PortTypeDescription
worldanyWire to the sibling `physicsWorld.world` output. Loader resolves the connection and registers the body during the physics phase.
enabledfloat1 = simulated, 0 = removed from broadphase + frozen at last pose. Wireable for state-machine gating.
xfloatKinematic-only: when wired, body pose is teleported to (x, y) each frame. Turns the body into a "live tracker" — wire `pointer.x` for a cursor body, or another physics body's `position.x` for a follow constraint. Pair with `frameSelector` to consume viewport-pixel pointer coords directly. Dynamic bodies ignore this.
yfloatKinematic-only: see `x` input. NaN sentinel = "not wired"; both x and y must be finite for the per-frame pose teleport to fire.

Outputs

PortTypeDescription
idfloatEngine handle as a stable f64. Wire to joint / drag / event nodes. Opaque to authors — never inspect.
positionvec2Current pose in px. Wire to `domPropertyWrite(translate)` for DOM, to STN.positionXY for canvas.
rotationfloatRotation
linearVelocityvec2In px/s. Useful for impact pulses, parallax intensity, secondary-motion drivers.
angularVelocityfloatAngular Velocity
awakefloat1 = simulating, 0 = sleeping (engine auto-sleeps low-velocity bodies). Wire into a `thresholdPulse` to fire "settled" effects.
xfloatConvenience: just position.x. Wire into `domPoseWrite.translateX` to drive a single component.
yfloatConvenience: just position.y.
speedfloatConvenience: |linearVelocity|. Useful for impact intensity, parallax intensity, secondary-motion drivers.

Parameters

ParameterTypeDefaultDescription
bodyKindenum"dynamic"Body Kind options dynamic, kinematic
frameSelectorstring""Optional CSS selector. When set on a kinematic body whose `x`/`y` inputs are wired, viewport-pixel coords (e.g. raw `pointer.x/y`) are converted to body coords using this element's per-frame BCR + the world's `originAlignment`. Typical use: `frameSelector: ".stage"` on a cursor body that follows `pointer.x/y` (where pointer reads `.track-wrapper`). Leave empty to consume `x`/`y` as already-in-body-coords.
shapephysicsShape{"kind":"circle","radius":25}Body shape — pick the kind (circle, box, polygon, edge), then fill in the per-kind parameters. Dynamic bodies need a primitive shape so the engine can compute mass + inertia from density. Use `circle` for ball-like things; `box` for cards / labels; `polygon` for non-axis-aligned rigid shapes (must be convex).
initialXfloat0Initial X (px)
initialYfloat0Initial Y (px)
initialRotationfloat0Initial Rotation (rad) step 0.01
initialVxfloat0Initial linear X velocity (px/s) at body creation time. Use for "thrown" entrances or pre-impulse setups.
initialVyfloat0Initial linear Y velocity (px/s) at body creation. Negative on a y-down axis throws the body upward.
initialAngularVelocityfloat0Initial spin in radians/second at body creation. Pair with low angular damping for sustained tumble. step 0.01
densityfloat1Mass per unit area. 0 is reserved for static bodies — use bodyKind: "kinematic" or `physicsStaticBody` instead. min 0.001; step 0.1
restitutionfloat0.50 = no bounce, 1 = perfectly elastic, > 1 = energy-amplifying (super-bouncy). min 0; max 2; step 0.05
frictionfloat0.5Surface friction coefficient. 0 = frictionless (slides forever), 1 = typical solid contact, > 1 = sticky. Combined with the touched body's friction per the engine's blend mode. min 0; max 2; step 0.05
linearDampingfloat0Per-second exponential damping on linear velocity. Higher = settles faster. min 0; step 0.05
angularDampingfloat0Per-second exponential damping on angular velocity. 0 = body keeps spinning forever; raise to bleed off rotation over time. min 0; step 0.05
lockRotationboolfalseWhen true, body cannot rotate (locks angular DOF). Useful for upright character bodies.
ccdboolfalseEnables tunnelling-prevention for fast-moving small bodies. Costs slightly more CPU.
canSleepbooltrueWhen true (default), the engine auto-sleeps the body once velocity drops below an internal threshold — gravity, forces, and joint corrections stop applying. Correct for most UI animations (settled balls SHOULD stop simulating). Set false for precision tests / pendulums where the small offset between "asleep at near-equilibrium" vs "exactly at equilibrium" matters, OR when a slept body should still be re-pulled by a wired force/joint that activates after the sleep.

Related nodes

Envelope

Use physicsBody 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/

Was this guide helpful?

Sunny Arora

Written by

Sunny Arora

Get technical deep dives delivered to your inbox

Join creators and developers who get exclusive insights, tutorials, and behind-the-scenes content every week.

No spam. Unsubscribe anytime.

Continue Exploring

You might also enjoy