RaycastInformation
Variables
Name |
Type |
Description |
---|---|---|
entity |
The hit Entity. |
|
distance |
float |
The closest distance to the hit Entity. |
normal |
Math::vec3 |
The normal of the hit surface. |
Notes
RaycastInformation is returned by the Scripting API’s raycast function or the Physics Module’s raycast function.
To find the position of the intersection, knowing rayOrigin
the origin position of the ray in world-space and rayDirection
the direction of the ray:
\(intersectionPosition = rayOrigin + (rayDirection * distance)\)