Plane.Raycast(Ray ray)
Intersects a ray with the plane.
Parameters:
Name | Type | Description |
---|---|---|
ray | Ray | the Ray to be cast |
Returns:
type | Description |
---|---|
boolean | Is intersect? |
number | Distance from Intersect |
Usage
---@type Plane
local plane;
---@type Ray
local ray;
local val0, val1 = plane.Raycast(ray)
Extra Detail
This function returns the distance along the ray, where it intersects the plane. If the ray is parallel to the plane, function returns false and returns zero. If the ray is pointing in the opposite direction than the plane, function returns false/ and returns the distance along the ray (negative value).