Mixing 2D and 3D, can editor camera treat Z as up?

Hey all,

I am working on a project to test the new Box2D physics system built into Unity 4.3 (running 4.3.2f1). Everything works completely fine with 2D colliders/rigidbodies attached to 3D meshes and level geometry (effectively a top-down 2.5D game).

Unfortunately, the 2D physics is tied to the XY plane (thus my game uses Z as “up”) but the editor in perspective 3D view always treats Y as “up” and displays a grid along the XZ plane. This makes level editing very awkward in 3D mode when I need to make lighting or positioning tweaks. (The camera is very hard to work with, and I need to spin it around many times to get a workable angle.)

Is there any way to change this default “up” direction in the editor (plugins, hacks, I’m open to anything)? Alternatively, does anybody have experience with this problem and discovered a different solution?

Thanks!

[As a newcomer here, it was unclear to me which forum to post this in. If a different forum is a better fit, please let me know!]

Hi,

i have the same problem. I was thinking of translating the tower game that i was developing “cheating” the 3d engine into 2d, but if i can’t look from top-down, i can’t use the unity terrain anymore and therefore i have to change a loooot of things…

If anybody found a solution about that (or knows if something like that it’s coming) it would be awesome to know it!

Best,
H

I also stumbled upon this limitation. I’d like to use the 2D physics for a top-down 3D game while keeping Y as “up”.

Really the editor should have an option to allow you to choose which plane Box2D resides in - X-Y, Y-Z, and ideally for me, X-Z. Anybody know if this feature is likely to be added?

Multiple people have said they have this problem. I wonder if it may be easier to stick with 3D mode and use the sprite system in that, rather than using 3D objects in 2D mode?

That way you can keep the top-down camera view.

http://forum.unity3d.com/threads/181063-Solved-Navigation-for-SceneView-camera

That does not fix this issue. That’s just for the camera itself. Y is still up, and the 2D physics is still fixed in the X-Y plane.

No, but it solves the view issue that he OP was talking about, keep the view under control.

If you want to make a “top down” game using 2d, you just do it facing the camera. Turn off the gravity in box2d and build it is normal. The only difference, structurally, in a “top down” game in 2d is the art and if you have gravity affecting the scene. Top down, no gravity. Side scroller yes gravity. (depending on design).

A 2d game has two axises, it doesn’t really matter what they are. It doesn’t matter if you are moving “up” and “down” or “left” and “right”, it is still X and Y in screen space, regardless of how it is presented to the player.

If you are using perspective, 3d models (and expecting them act/move/collide) in 3d space, then using 2d physics is the wrong choice, and always going to give problems. Just use the regular physics and lock everything to x/y (or x/z). Square peg/round hole type of issue.

You can certainly achieve any type of gameplay/display you want in Unity, you just have to use the proper tools, it the proper way. There are no limitations.