FMath::RayPlaneIntersection

Find the intersection of a ray and a plane.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h

Include

#include "Math/UnrealMathUtility.h"

Source

/Engine/Source/Runtime/Core/Public/Math/Plane.h

Syntax

static FVector RayPlaneIntersection
(
    const FVector & RayOrigin,
    const FVector & RayDirection,
    const FPlane & Plane
)

Remarks

Find the intersection of a ray and a plane. The ray has a start point with an infinite length. Assumes that the line and plane do indeed intersect; you must make sure they're not parallel before calling.

FMath inline functions

Returns

The point of intersection between the ray and the plane.

Parameters

Parameter

Description

RayOrigin

The start point of the ray

RayDirection

The direction the ray is pointing (normalized vector)

Plane

The plane to intersect with

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss