ProtoFlux:Ray To Line Intersection Distance

From Resonite Wiki
Revision as of 00:31, 3 July 2024 by Yosh (talk | contribs) (make it basically the same as the intersection page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Ray To Line Intersection Distance
Origin
Distance
Direction
Intersects
LinePoint0
LinePoint1
Geometry 2D

The Ray To Line Intersection Distance node determines the distance from a ray origin to the point at which the ray intersects a line segment defined by two points. This node is functionally equivalent to using the ProtoFlux:Ray To Line Intersection node, then plugging the value used for Origin and the Intersection output into a Distance<float2> node.

Inputs

Origin (float2)

Origin of the ray.

Direction (float2)

Direction of the ray.

LinePoint0 (float2)

First point of the line segment.

LinePoint1 (float2)

Second point of the line segment.

Outputs

Distance (float)

The Euclidean distance between Origin and the point at which the defined ray intersects with the line segment with endpoints LinePoint0 and LinePoint1. If the ray does not intersect, the value will be 0.

Intersects (bool)

True if the ray intersects with the line segment, False otherwise. See ProtoFlux:Ray To Line Intersection for what counts as intersection.

See Also