RealDocs

UKismetMathLibrary::MakeVector_NetQuantizeNormal

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

Description

Builds an FVector_NetQuantizeNormal from three components, a quantized type optimized for unit-length vectors such as normals and directions in the [-1, 1] range.

Caveats & Gotchas

  • Only appropriate for components already in the [-1, 1] range (normals, directions) — passing an unnormalized vector clamps or misrepresents components outside that range rather than erroring.
  • Does not normalize the input for you; if X/Y/Z don't already come from a unit vector, normalize before calling this or the quantization assumptions this type relies on for bandwidth savings don't hold.

Signature

static FVector_NetQuantizeNormal MakeVector_NetQuantizeNormal(double X, double Y, double Z)

Parameters

Name Type Description Default
X double X component.
Y double Y component.
Z double Z component.

Return Type

FVector_NetQuantizeNormal

Example

Quantize a surface normal for replication C++
FVector Normal = HitResult.ImpactNormal.GetSafeNormal();
FVector_NetQuantizeNormal QuantizedNormal = UKismetMathLibrary::MakeVector_NetQuantizeNormal(Normal.X, Normal.Y, Normal.Z);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.