RealDocs

UKismetMathLibrary::MakeVector2D

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

Description

Constructs an FVector2D from explicit X and Y double values. In Blueprint this is the standard 'Make Vector 2D' node produced automatically by the NativeMakeFunc meta tag.

Caveats & Gotchas

  • Parameters are double (not float) as of UE5's large-world coordinates migration. Passing float literals is fine due to implicit promotion, but be mindful when interfacing with older float-based APIs.
  • The NativeMakeFunc meta tag means Blueprint will use this function to construct FVector2D from individual pins automatically — you will see it as 'Make Vector 2D' rather than by its C++ name.

Signature

static UE_INL_API FVector2D MakeVector2D(double X, double Y);

Parameters

Name Type Description Default
X double The X component of the new vector.
Y double The Y component of the new vector.

Return Type

FVector2D

Example

Construct a 2D velocity vector C++
FVector2D Velocity = UKismetMathLibrary::MakeVector2D(150.0, -75.0);
// Equivalent to FVector2D(150.0, -75.0)

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.