Skip to main content
2 of 2
spelling
starikcetin
  • 5.3k
  • 4
  • 26
  • 60

Most efficient way to convert Vector3 to Vector2

What is the most efficient and fastest way to convert a Vector3 to a Vector2?

Casting:

Vector2 vector2 = (Vector2)vector3;

Initializing a new Vector2:

Vector2 vector2 = new Vector2(vector3.x, vector3.y);

Or is there another method that I don't know?

starikcetin
  • 5.3k
  • 4
  • 26
  • 60