UKismetMathLibrary::Matrix_GetFrustumBottomPlane
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Extracts the bottom clipping plane from a view-projection matrix. Returns false if extraction fails.
Caveats & Gotchas
- • The extracted plane's W component encodes the signed distance from the origin; comparing it directly against another plane's W without normalizing gives meaningless results.
- • For oblique projection matrices (used in planar reflections) the standard Gribb-Hartmann extraction can be incorrect — verify results when using non-standard projections.
Signature
static UE_INL_API bool Matrix_GetFrustumBottomPlane(const FMatrix& M, FPlane& OutPlane) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| M | const FMatrix& | The view-projection matrix to extract the bottom frustum plane from. | — |
| OutPlane | FPlane& | The extracted bottom plane of the frustum. | — |
Return Type
bool Example
Test visibility against all six frustum planes C++
FPlane Planes[6];
bool bValid =
UKismetMathLibrary::Matrix_GetFrustumNearPlane(VP, Planes[0]) &&
UKismetMathLibrary::Matrix_GetFrustumFarPlane(VP, Planes[1]) &&
UKismetMathLibrary::Matrix_GetFrustumLeftPlane(VP, Planes[2]) &&
UKismetMathLibrary::Matrix_GetFrustumRightPlane(VP, Planes[3]) &&
UKismetMathLibrary::Matrix_GetFrustumTopPlane(VP, Planes[4]) &&
UKismetMathLibrary::Matrix_GetFrustumBottomPlane(VP, Planes[5]);
if (bValid)
{
bool bInFrustum = true;
for (const FPlane& Plane : Planes)
bInFrustum &= Plane.PlaneDot(TestPoint) >= 0.0f;
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?