- Home /
Should I use Vector3D in a 2D game?
I am currently following the 2D roguelike tutorial. Altough it is obviously a 2D game, in the scripts always a Vector3D is used. Are casts such expensive or what is the reason?
Comment
Answer by Babul2 · Sep 07, 2017 at 11:56 AM
All Positions in Unity is vector 3. It doesn't matter whether you use vector 2 or 3. Vector 2 simply set the z axis to zero. But your Camera should be in Orthographic mode.
Your answer
Follow this Question
Related Questions
How to use 2D pathfinding with vector 2 0 Answers
Overload Vector3's operator + 2 Answers
Normalizing a vector 1 Answer
conserve momentum of vector3.moveTowards in 2D game 0 Answers