Houdini 22.0 Nodes APEX nodes

geo::XyzDist

Finds the distance, primitive number, and UV coordinates from a point to the closest location on a geometry.

On this page
Since 22.0

Finds the distance, primitive number, and UV coordinates from a point to the closest location on a geometry.

See geo::InitIntersectCache for how to create an intersection cache, and rig::PrimConstraint for how to use the output values of this node.

Inputs

intersect_cache: geo::IntersectCache

An intersection cache object, created via the geo::InitIntersectCache node.

origin: Vector3

The position in space from which to find the closest position on the geometry.

maxdist: Float

The maximum distance to search. A value of 0 or less specifies an infinite distance. Setting a value for this port can speed up this node by allowing it to quit early when the maximum distance is reached.

Outputs

hit: Bool

Returns True if the operation is successful and a closest point is found. Always returns True if maxdist is 0 or less.

primnum: Int

The number of the closest primitive, or -1 if no primitive is found.

uvw: Vector3

The UVW position within the primitive the ray intersects.

dist: Float

The distance from the origin to the closest location on the geometry.

See also

APEX nodes