Vec2FromAngle

Vec2FromAngle

Function. Calculates a 2D vector from an angle and length.

Mathematically: vec2(cos(angle) × length, sin(angle) × length).

Useful for creating directional vectors in 2D from rotation angles.

Properties & inputs:

  • Angle (input | property): Rotation angle in degrees.
  • Length (input | property): Length of the resulting vector.

Output:

  • 2D vector with the given direction and length.