ProtoFlux:Ray Rectangle Intersection

From Resonite Wiki
Revision as of 19:25, 30 June 2024 by Yosh (talk | contribs) (create page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Ray Rectangle Intersection
Origin
Intersection
Direction
Intersects
Rectangle
Geometry 2D

The Ray Rectangle Intersection node determines the first point at which a ray defined by an origin and direction intersects the bounds of the provided Rect.

Inputs

Origin (float2)

Origin of the ray.

Direction (float2)

Direction of the ray.

Rectangle (Rect)

Rectangle to detect intersections with.

Outputs

Intersection (float2)

The first point at which the defined ray intersects with the bounds of Rectangle. If the ray does not intersect, the value will be [0; 0].

Intersects (bool)

True if the ray intersects with Rectangle, False otherwise.

Examples