1
\$\begingroup\$

Do I have to rotate the camera to top-down view if I want to crate a top-down 2D game or just disable gravity?

\$\endgroup\$
7
  • \$\begingroup\$ These two aren't necessarily related. You might want to create a top-down game with gravity (e.g.: GTA 1 and 2 both had gravity and jumping) \$\endgroup\$ Jan 15, 2017 at 20:25
  • \$\begingroup\$ So I guess the answer is "depends what you want to do" \$\endgroup\$ Jan 15, 2017 at 20:26
  • \$\begingroup\$ @UnholySheep I want to make 2D top-down quest, should I rotate the camera? \$\endgroup\$
    – Sharpy
    Jan 15, 2017 at 20:28
  • \$\begingroup\$ I (personally) would do it that way. I also believe that it was recommended in one of the official Unity tutorials (for a top-down Asteroids-like game) \$\endgroup\$ Jan 15, 2017 at 20:30
  • 1
    \$\begingroup\$ It depends if you want to use the 2D physics system, which by default works on the XY plane. I haven't investigated whether it can be configured to work in XZ. \$\endgroup\$
    – DMGregory
    Jan 15, 2017 at 20:33

1 Answer 1

0
\$\begingroup\$

You can do whatever you want.


That said, it is worth considering standards. Picture your game space as a 2D grid. If you retain the default camera angle, you would be working along the X and Y axis. If you rotate your camera to a down-facing position, you would be working along the X and Z axis.

I would say "leave the camera the way it is"; it is far more conventional to refer to a position on a 2D plane as "X, Y". While you could easily portray coordinates as "X, Y" to the user, you still have to work in "X, Z", yourself. Any built in methods that apply to two-dimensional coordinates will also assume use of "X, Y", including the directional vectors housed in the Vector2 class.

Why add another layer of complexity to your project? Use the "X, Y" plane, and stick to 2D standards.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .