RealDocs

UKismetMathLibrary::Matrix_GetMaximumAxisScale

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

Description

Returns the largest magnitude among the three row vectors of the matrix, representing the maximum scale factor along any axis. Useful for conservative bounds calculations or LOD distance scaling.

Caveats & Gotchas

  • Returns the maximum row magnitude, which equals the maximum axis scale only for transforms with orthogonal (non-sheared) rotation rows. On a sheared matrix the result is an overestimate of the actual scale.
  • Does not consider the W (translation) row, only the upper 3×3. The returned value is always non-negative.

Signature

static UE_INL_API float Matrix_GetMaximumAxisScale(const FMatrix& M)

Parameters

Name Type Description Default
M const FMatrix& The matrix to inspect.

Return Type

float

Example

Compute conservative bounding-sphere radius after a matrix transform C++
FMatrix WorldMat = MyMesh->GetComponentTransform().ToMatrixWithScale();
float MaxScale = UKismetMathLibrary::Matrix_GetMaximumAxisScale(WorldMat);
float WorldRadius = LocalRadius * MaxScale;

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.