UKismetMathLibrary::Matrix_GetFrustumFarPlane
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Extracts the far clipping plane from a view-projection matrix. Returns false if the plane cannot be extracted.
Caveats & Gotchas
- • Infinite projection matrices (common in UE5 for reverse-Z) do not have a traditional far plane — extraction will fail or produce invalid results for these matrices.
- • The matrix must be a combined View * Projection matrix; passing only a projection matrix will produce incorrect world-space plane values.
Signature
static UE_INL_API bool Matrix_GetFrustumFarPlane(const FMatrix& M, FPlane& OutPlane) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| M | const FMatrix& | The view-projection matrix to extract the far plane from. | — |
| OutPlane | FPlane& | The extracted far plane of the frustum, in world space. | — |
Return Type
bool Example
Extract far plane for visibility checks C++
FMatrix ViewProjectionMatrix = ViewMatrix * ProjectionMatrix;
FPlane FarPlane;
if (UKismetMathLibrary::Matrix_GetFrustumFarPlane(ViewProjectionMatrix, FarPlane))
{
float DistToFar = FarPlane.PlaneDot(ActorLocation);
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?