RealDocs

UKismetMathLibrary::Matrix_GetRotDeterminant

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

Description

Returns the determinant of the upper-left 3x3 rotation submatrix. Useful for checking whether the rotational component represents a proper rotation (+1) or an improper one including reflection (−1) without the cost of the full 4x4 determinant.

Caveats & Gotchas

  • This assumes the top-left 3x3 represents a rotation — the result is only meaningful for transform matrices. Passing an arbitrary matrix (projection, scale-only) will give a value with no geometric interpretation.
  • The full 4x4 determinant (Matrix_GetDeterminant) and the 3x3 rotation determinant can differ when the matrix has a non-unit scale row in the 4th row/column. Use the right one for your specific check.

Signature

static UE_INL_API float Matrix_GetRotDeterminant(const FMatrix& M)

Parameters

Name Type Description Default
M const FMatrix& The matrix whose top-left 3x3 rotation submatrix determinant to compute.

Return Type

float

Example

Detect reflection in a transform matrix C++
float RotDet = UKismetMathLibrary::Matrix_GetRotDeterminant(TransformMatrix);
bool bIsReflected = RotDet < 0.f; // negative det means the rotation includes a mirror

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.