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
Spawning particles, decals or effects where two pieces of geometry touch
Orienting something to a surface at the moment of contact, using the reported normal
Enter and exit events for overlapping geometry, without a physics simulation
Contact data from arbitrary graph geometry rather than simulated bodies
| Parameter | Type | Default |
|---|---|---|
geometry_a | GpuGeometry | — |
geometry_b | OneOf([FieldOf(Sdf)]) | — |
max_pairs | Number | 10000 |
threshold | Number | 0.100 |
track_identity | Boolean | false |
opacity | Number | 1 |
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
Wire the query geometry into A and the surface to test against into B.
Lower Threshold until only the relevant contacts are reported.
Turn on Track Identity, with
@idset upstream on A, to split contacts into Entered, Staying and Exited streams for one-shot effects.Read
@contact_distand@contact_Noff the Contacts output to drive penetration-based or surface-aligned effects.
See also
Trigger · Physics Query · Rigid Body Sim · Distance fields & volumes