util.IntersectRayWithPlane
Vector, number util.IntersectRayWithPlane( Vector rayOrigin, Vector rayDirection, Vector planePosition, Vector planeNormal )
Description
Performs a ray-plane intersection and returns the hit position or nil.
Arguments
Returns
2 number
The distance from start position to the hit point, if there was a hit.
This was recently added in version (2026.07.17). It might only be available on the Dev Branch right now.
Garry's Mod
Rust
Steamworks
Wiki Help