UKismetMathLibrary::Vector2D_Zero
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureUFUNCTION
Description
Returns the constant FVector2D (0, 0). Useful for initialising a 2D vector to a null/empty state or as an additive identity.
Caveats & Gotchas
- • A zero vector has no defined direction — normalising it will produce NaN. Always check IsNearlyZero() before normalising a vector that may have been accumulated from zero.
- • Primarily useful in Blueprint where a zero Vector2D literal requires an explicit Make node; in C++ FVector2D::ZeroVector or FVector2D(0.0, 0.0) is more idiomatic.
Signature
static UE_INL_API FVector2D Vector2D_Zero(); Return Type
FVector2D Example
Reset accumulated 2D velocity C++
FVector2D Velocity = UKismetMathLibrary::Vector2D_Zero();
// Velocity == (0.0, 0.0) Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?