util.IntersectRayWithPlane

From Garry's Mod
Jump to: navigation, search
 util.IntersectRayWithPlane( )

Contents

Description

Performs a ray-plane intersection and returns the hit position or nil.

Arguments

Vector rayOrigin

Origin/start position of the ray.

Arguments

Vector rayDirection

The direction of the ray.

Arguments

Vector planePosition

Any position of the plane.

Arguments

Vector planeNormal

The normal vector of the plane.

Returns

Vector

The position of intersection, nil if not hit.
Personal tools
Navigation