Collision Detect

Report which points of A touch B's surface, with penetration depth and normal, without running a simulation. Enter and exit tracking per identity is optional.

What it does

Tests every point of geometry A against the surface of geometry B and reports which points are touching, with no simulation running. Each contact carries its signed penetration depth and B's surface normal at that point.

Geometry B can be a mesh, an analytic shape or an image, auto-converted to a Distance Field. With Track Identity on, points carrying an @id are diffed frame to frame into separate Entered, Staying and Exited streams.

When to use it

ParameterTypeDefault
geometry_aGpuGeometry
geometry_bOneOf([FieldOf(Sdf)])
max_pairsNumber10000
thresholdNumber0.100
track_identityBooleanfalse
opacityNumber1

Gotchas

Threshold is a signed distance. Lowering it tightens the contact zone around B's surface. Points already inside B count as contact regardless of Threshold, because their signed distance is negative.

This is a point-proximity test, not surface-to-surface intersection. A's individual points are checked against B's surface; edges and faces are not tested for crossing. On a fine mesh this approximates well, on a coarse one contacts between points are missed.

Track Identity needs an @id attribute on geometry A to diff contacts across frames. Without it, Entered, Staying and Exited stay empty even with the toggle on.

Worked example

  1. Wire the query geometry into A and the surface to test against into B.

  2. Lower Threshold until only the relevant contacts are reported.

  3. Turn on Track Identity, with @id set upstream on A, to split contacts into Entered, Staying and Exited streams for one-shot effects.

  4. Read @contact_dist and @contact_N off the Contacts output to drive penetration-based or surface-aligned effects.

See also

Trigger · Physics Query · Rigid Body Sim · Distance fields & volumes