Skip to content

Create

What It Does

Creates a 2D vector from x and y coordinate values. A 2D vector represents both direction and magnitude, useful for positions, dimensions, or movements in a 2D space.

Inputs

NameDescriptionTypeRequired
xThe horizontal component of the vectorNumberYes
yThe vertical component of the vectorNumberYes

Outputs

NameDescriptionType
valueThe created 2D vectorVector2

Create Vector2 Example

How to Use It

  1. Drag the Create Vector2 node into your graph.
  2. Connect or enter a number for the "x" input.
  3. Connect or enter a number for the "y" input.
  4. Run the graph—your output will be a 2D vector containing both values.

Tips

  • Vectors are represented as [x, y] arrays but have special properties when used with vector operations.
  • Use this node when you need to work with positions, directions, or sizes in 2D space.

See Also

  • Vector2 Add: For combining two vectors together.
  • Vector2 Destructure: For breaking a vector into its x and y components.

Use Cases

  • Position Calculations: Create position vectors for layout algorithms.
  • Size Definition: Define width and height as a vector for aspect ratio calculations.
  • Direction Vectors: Create normalized direction vectors for animations or gradients.