RealDocs

UKismetMathLibrary::Matrix_GetFrustumNearPlane

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Extracts the near clipping plane from a view-projection matrix. Returns false if the plane extraction fails.

Caveats & Gotchas

  • The matrix must represent a combined View * Projection matrix, not a standalone view or projection matrix — passing a model matrix will yield nonsense results.
  • Always check the return value; a degenerate or near-zero projection matrix can cause extraction to fail, returning an invalid plane.

Signature

static UE_INL_API bool Matrix_GetFrustumNearPlane(const FMatrix& M, FPlane& OutPlane)

Parameters

Name Type Description Default
M const FMatrix& The matrix to extract the frustum plane from. Must represent a View Projection Matrix.
OutPlane FPlane& The extracted near plane of the frustum, in world space.

Return Type

bool

Example

Extract near plane from camera projection C++
FMatrix ViewProjectionMatrix = ViewMatrix * ProjectionMatrix;
FPlane NearPlane;
if (UKismetMathLibrary::Matrix_GetFrustumNearPlane(ViewProjectionMatrix, NearPlane))
{
    // Use NearPlane for frustum culling or clipping
    UE_LOG(LogTemp, Log, TEXT("Near plane W: %f"), NearPlane.W);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.