Sticking with Vector2 on a 2D game?

Hello, I’ve worked entirely with 2D games with unity and so far I noticed that every once in a while, I have to either convert Vector3 to Vector2 manually or cast vectors so that I can say for example, perform operations, especially when I’m getting a position of a gameObject.

Is there a way to work entirely with Vector2?

or from a different approach… would it be better if I just work entirely with Vector3 and just ignore the z axes instead wasting code with casting and such?

I’ve noticed the same thing and I decided to just go with Vector3 for everything even though Z will be 0 all the time. Good thing is that Vector3 has a Constructor that doesn’t need a Z value :slight_smile:

1 Like

Thanks for the response! You just saved me a lot of time.

Post examples of annoyances. Better to deal with them than to use Vector3.