RealDocs

UKismetMathLibrary::Add_Vector2DVector2D

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

Description

Returns the component-wise sum of two 2D vectors (A + B). This is the Blueprint-exposed equivalent of the FVector2D + operator.

Caveats & Gotchas

  • In Blueprint this node is marked CommutativeAssociativeBinaryOperator, so it can be chained to add more than two inputs on a single node.
  • Prefer the C++ operator+ directly in code — this static function exists primarily for Blueprint and scripting interop.

Signature

static UE_INL_API FVector2D Add_Vector2DVector2D(FVector2D A, FVector2D B);

Parameters

Name Type Description Default
A FVector2D The first vector.
B FVector2D The vector to add.

Return Type

FVector2D

Example

Offset a UI position C++
FVector2D Base(100.f, 200.f);
FVector2D Offset(10.f, -5.f);
FVector2D Result = UKismetMathLibrary::Add_Vector2DVector2D(Base, Offset);
// Result = (110, 195)

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.