I was experimenting with getting a 2.5D game working where the game was running in 3D but collisions occur on a 2D plane. I was manually creating 3D box colliders and projecting them onto an orthographic camera near fustrum plane however I ran into some really strange problems which may (or may not) be a bug with Unity:
http://answers.unity3d.com/questions/588344/transformposition-of-child-object-not-working-as-i.html
I just downloaded the latest version of Unity and noticed all the 2D stuff added and immediately had the idea of adding 2D box colliders to my objects instead of the above method.
Upon adding box colliders and resizing them I noticed that they show up in the positions I wanted in the editor view. However I can’t seem to figure out how to get collisions working with them. I don’t want any physics interactions as these are only meant to detect collision so I am using triggers.
I set isTrigger to true for all 2D colliders and added isKinematic RigidBody2D to the object as well. I then implemented onTriggerEnter2D(Collider2D collider) in the script on the same object as the rigidbodies. It doesn’t seem to register any hits though, am I missing something? Is the behaviour undefined if I have no sprite attached?
Also I noticed that the x/y scale for the box collider 2D is not 1:1 on the screen plane, what determines the scaling ratio? Finally I assume that all 2D colliders work on the same plane (view plane or one parallel to the viewplane), is this correct?


