Author Topic: 2D vs. 3D Colliders  (Read 2134 times)

Yukichu

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 8
  • Posts: 101
    • View Profile
2D vs. 3D Colliders
« on: May 27, 2014, 09:54:22 AM »
What are the benefits / drawbacks of using 2D vs. 3D Colliders?

2D Colliders
- Faster I presume
- ???

Are you able to 'stack' colliders... probably not efficiently at least, as in have one collider 'on top' of another collider.  I know the 3D colliders you could adjust the z position, or so I thought at one point, to order which one would be 'on top'.  I presume 2D colliders won't do that.

If I change my project to 2D colliders, and I find out everything is a fail, can I easily just switch back to 3D colliders?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2D vs. 3D Colliders
« Reply #1 on: May 28, 2014, 07:39:39 AM »
Performance difference is unknown at this time. In all my testing I couldn't find any difference, but someone with a large complex UI may notice something.

I am not quite clear on what you mean by stacking colliders.

Yes, you can switch back to 3D colliders via the same menu (NGUI -> Extras)

Yukichu

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 8
  • Posts: 101
    • View Profile
Re: 2D vs. 3D Colliders
« Reply #2 on: May 28, 2014, 01:34:28 PM »
Stacking colliders...  well, I guess I'll find out now I know I can switch back and forth as needed.

Example:  button within a button.  2D colliders are 'flat' and use the same Z, regardless of what you try to set them to.  I presume it can figure this out.  I'll just go test and find out, thanks.

ZachHoefler

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 13
    • View Profile
Re: 2D vs. 3D Colliders
« Reply #3 on: May 28, 2014, 02:30:07 PM »
2D objects can't collide with 3D objects, and vice-versa. Theoretically, you could be doing something with physics in your menu where you'd want to use the relevant physics engine. Beyond that, *shrug*