Author Topic: Problem with full screen collider  (Read 2292 times)

Jens

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Problem with full screen collider
« on: April 24, 2014, 09:39:18 AM »
We're currently working on an app for iOS and will thus need touch controls. When using the Input class, it doesn't take into consideration whether or not a button is touched. To fix this, we usually create a big empty collider in the background and place all buttons in front of it.

But now in our newest project, this setup doesn't work. The button in front cannot be clicked on, no matter the z-axis. When I disable the full screen collider, the buttons do work properly. (Weird thing: after re-enabling the collider clicking works once!!!). Both colliders only have the Box Collider and UIEvent Trigger components. Any ideas what could cause this problem?

Thanks in advance,
  Jens

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with full screen collider
« Reply #1 on: April 25, 2014, 06:42:50 AM »
Colliders need to go on widgets, not plain game objects. When you put them on a plain game object it has to consider the depth of all the widgets underneath, and then chooses the highest one's depth.

ALT+SHIFT+W, ALT+SHIFT+C, resize to cover your dimensions.

Jens

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Problem with full screen collider
« Reply #2 on: April 25, 2014, 06:53:57 AM »
Thanks, solved the issue. Need to get used to this new version (at least for me it's new) :P