Queries (sim-free)

Ask spatial questions without running a simulation: is this inside that zone, are these points touching, what does this ray hit.

Query nodes answer questions about where things are without gravity, mass or a solver stepping every frame. They are fast, they run on ordinary graph geometry, and they suit game-style logic: pickups, kill zones, checkpoints, doors, contact sparks and aiming.

Trigger zones

The Trigger node answers the simplest spatial question: which of these elements are inside that region?

Feed it a set of points as elements and a zone. The zone can be a primitive shape, an Analytic shape, a mesh, a raster or a Distance Field, all converted to a region automatically. Anything inside comes out the inside pin, and every element is tagged with its signed @distance to the zone's surface, so you can fade, scale or colour by proximity.

The zone is evaluated wherever the query points are, so a moving zone costs nothing extra. Animate it or drive it from a Pointer and the test follows.

The radius parameter controls how the test is done. Leave it at 0 for a pure point test, where the element's centre must be inside. Raise it to treat each element as a small sphere, so a point counts as inside the moment its edge touches the zone.

ParameterTypeDefaultWhat it does
elementsCollectionElements to test against the zone (points; carry @id for enter/exit tracking)
zoneSDFZone region (primitive / CSG / mesh / raster — auto-converted to SDF)
radiusNumber0Inside if signed distance < radius (0 = point test, >0 = sphere)
track_identityBooleanfalseDiff the @id column frame-to-frame for enter/exit events (requires @id on elements)
opacityNumber1Layer opacity (0 = transparent, 1 = opaque). Editable, wirable, keyframable.

Enter and exit events

Turn on Track identity and the Trigger remembers what was inside last frame. As long as the elements carry an @id, which points from the Points node and from a particle sim do, three extra streams appear:

That is what a pickup firing once on entry needs, or a checkpoint that triggers a sound the moment a runner crosses it.

Contact detection

Collision Detect goes further than a yes/no region test. It reports which points of one piece of geometry are touching the surface of another, with the contact detail.

Feed it a mesh as geometry_a and a surface as geometry_b, again a mesh, Analytic shape, raster or Distance Field, all auto-converted. Any of A's points within the threshold distance of B's surface come out the contacts pin, each carrying @contact_dist, the signed penetration depth where negative means the point is inside B, and @contact_N, the surface normal at the contact, which orients sparks, decals or splashes flat on the surface.

Use it to spawn effects exactly where things touch, snap geometry to a surface, or build a custom contact response, with nothing registered in a solver.

Collision Detect tests points against a surface rather than triangle against triangle. A point counts as touching when it is close enough to B's surface, which is lighter than true mesh intersection and right for most gameplay and effects work. It supports the same Track identity enter and exit streams as the Trigger.

ParameterTypeDefaultWhat it does
geometry_aGPU GeometryMesh whose points are tested for contact with B
geometry_bSDFSurface to collide against (mesh / CRC / raster — auto-converted to SDF)
max_pairsNumber10000Maximum number of contacts to report
thresholdNumber0.100Report points whose signed distance to B is below this threshold
track_identityBooleanfalseDiff the @id column frame-to-frame for contact enter/exit (requires @id on geometry_a)
opacityNumber1Layer opacity (0 = transparent, 1 = opaque). Editable, wirable, keyframable.

Raycasts and overlaps

Physics Query casts rays and sweeps shapes against the colliders set up in a physics world. It covers aiming, line-of-sight, ground-snapping, and finding what is near a point.

It runs four kinds of query.

Every query reports whether it hit, the hit point, the hit normal, the distance, which body was hit, an overlap count, and whether the origin started inside a collider. Wire those into expressions or other nodes.

Physics Query tests against the colliders registered in a physics world, the static colliders and bodies you have set up, not arbitrary graph geometry. To query a loose mesh or shape with no solver involved, use Trigger or Collision Detect, which take any geometry directly.

ParameterTypeDefaultWhat it does
world_idString"default"Physics world identifier
query_typeString"Raycast"Query type: Raycast, ShapeCast, PointQuery, Overlap
origin_xNumber0Query origin X
origin_yNumber100Query origin Y
origin_zNumber0Query origin Z
direction_xNumber0Direction X (Raycast/ShapeCast)
direction_yNumber-1Direction Y (Raycast/ShapeCast)
direction_zNumber0Direction Z (Raycast/ShapeCast)
max_distanceNumber1000Maximum query distance
query_shapeString"Ball"Shape for ShapeCast/Overlap: Ball, Cuboid
query_radiusNumber5Radius for Ball shape
query_half_xNumber5Half-extent X for Cuboid shape
query_half_yNumber5Half-extent Y for Cuboid shape
query_half_zNumber5Half-extent Z for Cuboid shape
opacityNumber1Layer opacity (0 = transparent, 1 = opaque). Editable, wirable, keyframable.

Choosing between them

Trigger and Collision Detect need no solver at all, and Physics Query reads a world without stepping it, so all three are cheap to scatter through a graph for interactive behaviour.

See also