Need some very basic explanation on 2d coordinates and triggers

I am, to all intents and purposes, a newbie with Unity, especially 2D. I had set up a basic top down scene, and because of the ground grid that appears in the Scene view, and because it seemed natural to have the Y axis as vertical, I set everything up that way, with a plane along the “ground” and main camera pointing down.

As soon as I started adding 2D colliders, I realised something was amiss, because the standard circle collider is rotated flat along the XY plane and there seems to be no means of rotating it. I tried using 3D colliders instead, but it seems those don’t work with a 2D sprites.

Could someone point me to a broad tutorial on this?

My specific questions here are:
(1) What exactly is the function of the “ground” graphic in the Scene view, since it isn’t actually a physical ground. Is it just a reference? If the latter, is it possible to remove or change it to the XY plane instead of the default XZ? - Because when your 2D game ground is XY, it’s extremely distracting to have this ghost plane coming out in a completely inappropriate dimension.
(2) Is it in fact possible to rotate 2D colliders to be flat with the XZ plane? And, by extension, set up the whole 2D set up to the XZ plane? (I just can’t understand why the default is XY, since all general conventions have Y as vertical). It isn’t strictly true to say that the axes are equal relative labels - some axes are excluded from some settings. For instance, you can change 3d gravity settings, but 2d gravity settings don’t give you the option to change the Z axis.

Unless you using 3d models you should make your top down game in x y axis. Unity’s 2d physics engine works only in x y 2d. Only one thing you need to do is changing gravity scale in your 2d rigidbodys to 0.

Okay, that’s clear, thanks. Is there anything I can do about the “ground” grid which is extremely distracting when it’s not the ground plane? (I find I need to view the scene in 3d - for instance, because the main camera obliterates half my sprites in 2d.)

You dont understand the point of 2d. Its just XY, thats it. And dont mess with 3d and 2d. Use either one of them, unless its not something too specific…

Could you come out with a screenshot, which confuses you?

This might help

The ‘ground’ is at y=0 , I’m not sure what you mean by needing to work in 3D because the camera obliterates half your stuff.

I’m aware my questions are foolish newbie ones. I have a sprite starting at (0,0). Since the main camera is also at (0,0) I can’t see the sprite in 2D behind the camera label. Zooming in, the camera label simply gets larger and obliterates more of the scene. Regarding the “ground” at Y=0, I don’t see the point of having this distracting plane coming out of the screen, when in a top down arrangement the real ground is the XY plane. It’s more difficult to think in 2D when there’s this unavoidable third plane zooming out of the scene. An option to turn it off would be handy.
Anyway, I’m not sure that 2D is just XY. For instance, the camera has to extend into the Z axis even in orthographic mode. (Its distance along the Z axis in perspective mode can also be used to achieve parallax effects - though that’s more ambitious than anything I’m doing). When I was working in the XZ axis, I had sprites moving around exactly as I wanted and things only came unstuck when I realised 2D colliders didn’t work. Now, in the XY plane, the sprites rotate but don’t move. Maybe it would be easier to do the whole thing in 3D mode, but I’m guessing 2D sprites won’t work.

  1. How come you cant see the sprite?? Scale it up, or disable the gizmos…
  2. Can you make a picture of what u r thinking as a “ground”? I didnt get this part at all…
  3. 2D is just XY… if you want to make the parallax effect then you have a 2d tools for that. The Sprite Renderer component has the sorting layer feature… you can use that instead of Z axis to make the parallax effect as its the more “right” way of doing things. Here is a tut about this

thing. https://unity3d.com/learn/tutorials/modules/beginner/2d/sorting-layers

Thanks for the reply. Immediate problem is resolved by rebuilding from the beginning. I did try to find how to disable the camera gizmo, but couldn’t find it in the dropdown list. I’ve simply moved the offending sprite pro tem. The “ground” isn’t really ground, it’s just the y=0 plane. I still needed to go into 3d to organise lighting. Anyway, all okay for the moment. Thanks for putting up with my dumb questions.