RealDocs

UKismetMathLibrary::Vector4_Normalize3

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

Description

Normalizes the XYZ components of the vector in-place, setting W to 0. If the squared XYZ length is below Tolerance the vector is set to (0,0,0,0).

Caveats & Gotchas

  • This is BlueprintCallable (not BlueprintPure), so in Blueprints it appears as an exec node that mutates the ref parameter rather than returning a new value — a different pattern from Vector4_Normal3.
  • The default tolerance is 1e-8 (much tighter than Vector4_Normal3's 1e-4), so very small but non-zero vectors that would be zeroed by Vector4_Normal3 may still be normalized here.

Signature

static UE_INL_API void Vector4_Normalize3(UPARAM(ref) FVector4& A, float Tolerance = 1.e-8f);

Parameters

Name Type Description Default
A UPARAM(ref) FVector4& The vector to normalize in place.
Tolerance float Minimum squared length for normalization; sets vector to zero if below this. 1.e-8f

Return Type

void

Example

In-place normalize before use C++
FVector4 Dir(1.0, 2.0, 2.0, 5.0);
UKismetMathLibrary::Vector4_Normalize3(Dir);
// Dir.X/Y/Z now unit length, Dir.W == 0

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.