Ray Rectangle Intersection
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
-
An example of the Ray Rectangle Intersection node, along with a graphical visual of the intersection.