Skip to main content
spelling
Source Link
starikcetin
  • 5.3k
  • 4
  • 26
  • 60

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

Casting:

Vector2 vector2 = (Vector2)vector3;

InitailizingInitializing a new Vector2:

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

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

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

Casting:

Vector2 vector2 = (Vector2)vector3;

Initailizing a new Vector2:

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

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

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?

Tweeted twitter.com/StackGameDev/status/683365011230732288
Source Link
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;

Initailizing a new Vector2:

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

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