RealDocs

UKismetMathLibrary::Add_VectorVector

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

Description

Adds two vectors component-wise, returning a new FVector. This is the Blueprint '+' operator for vectors and the most common way to offset a position or accumulate a direction.

Caveats & Gotchas

  • Component-wise addition does not preserve vector length — if you need to combine directions and maintain a unit vector, normalize the result afterward.
  • In Blueprint the node appears as 'vector + vector' with a compact '+' title; both inputs are displayed as a single pin cluster, which can obscure which vector is A and which is B when reading graphs.

Signature

static UE_INL_API FVector Add_VectorVector(FVector A, FVector B);

Parameters

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

Return Type

FVector

Example

Offset actor position by a delta C++
FVector CurrentPos = MyActor->GetActorLocation();
FVector Delta = FVector(0.f, 0.f, 100.f);
FVector NewPos = UKismetMathLibrary::Add_VectorVector(CurrentPos, Delta);
MyActor->SetActorLocation(NewPos);

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.