Detects intersections with colliders in the 2D environment by casting a ray from one point in space to another. All
determines if the ray should extend to its entire length, while Near
will stop at the nearest object it hits.
Name | Data Type | Description |
---|
Start | Exec | Starts the ray cast |
Ray Type | String | Determines if the ray should extend to its entire length, or stop at the nearest object it hits |
Origin | Vec2 | The starting point of the ray. You can provide a 2D vector value as the ray's origin. |
Direction | Vec2 | The direction in which the ray will be cast. You can provide a 2D vector value as the ray's direction. |
Length | Number | The maximum length the ray should extend. If not provided, the ray will extend infinitely. |
Output
Name | Data Type | Description |
---|
Next | Exec | Executes the next node |
Ray Hit | Boolean | Outputs true if the ray cast hits an object; false if not. Connect this output to other nodes to create custom logic based on the ray cast result. |
Hit Info Array | 2D Array | The result of the ray cast if it intersects with a collider. Connect this output to a Ray Hit Info node to access the information. |