Documentation / Node reference / geo nodes

geo/Ray

Moves the points of input 0 onto the surface plugged into input 1.

Helpers

Every point of input 0 either casts a ray along its normal until it meets input 1 (NORMAL), or jumps straight to the closest point of it (NEAREST). Points that hit nothing stay where they are. The two inputs are read in ONE frame: input 1 keeps its own, and the rays are carried into it through both objects' world matrices, so a collision mesh placed by a geo/Transform in OBJECT mode is hit where it stands. NORMAL mode needs an N attribute on input 0, which is what geo/Normals is for.

Both inputs are read WHOLE: every object of input 0 casts, at every triangle object of input 1, and a point takes whichever hit is nearest measured in WORLD units. So a geo/Merge of several collision meshes works, and so does a geo/Merge of several point sets. Objects on input 1 that are not triangle meshes are skipped, since that is what a collision tree can be built from.

One limit worth knowing: under a NON-UNIFORM scale on input 1, NEAREST finds the point closest in the squashed frame rather than in world. A rotation, a translation and a uniform scale all agree exactly.

Parameters

Name Type What it does
mode UInt8 NORMAL · NEAREST NORMAL casts a ray along each point's normal. NEAREST ignores the normal and takes the closest point of input 1, which needs no N attribute.
bidirectional Bool NORMAL mode only: also cast backwards along the normal and keep whichever hit is nearer. Off, a point whose surface sits behind it is left alone.
maxDistance Float Ignore a hit further away than this, leaving the point where it was. In WORLD units, measured after each of the two objects has gone through its own transform. 0 means no limit.
updateNormals Bool Overwrite each moved point's normal with the surface normal where it landed. Off keeps the normal the point arrived with.

See also

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.