UKismetMathLibrary::Matrix_GetFrustumTopPlane
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Extracts the top clipping plane from a view-projection matrix. Returns false if extraction fails.
Caveats & Gotchas
- • "Top" is defined in clip space, not world space — the plane's world-space normal will depend on the camera's orientation.
- • For stereo rendering each eye has its own view-projection matrix; you must extract planes per-eye rather than using a single shared matrix.
Signature
static UE_INL_API bool Matrix_GetFrustumTopPlane(const FMatrix& M, FPlane& OutPlane) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| M | const FMatrix& | The view-projection matrix to extract the top frustum plane from. | — |
| OutPlane | FPlane& | The extracted top plane of the frustum. | — |
Return Type
bool Example
Check if a world point is below the top frustum plane C++
FPlane TopPlane;
if (UKismetMathLibrary::Matrix_GetFrustumTopPlane(ViewProjMatrix, TopPlane))
{
bool bBelowTop = TopPlane.PlaneDot(WorldPos) >= 0.0f;
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?