Hello Guest

Author Topic: How to enlarge the touch area (collider) of a tk2dUIItem?  (Read 4063 times)

kag359six

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
How to enlarge the touch area (collider) of a tk2dUIItem?
« on: July 19, 2013, 01:53:41 am »
Enlarging the box collider I have attached to the UIItem doesn't work. The touch or click only registers when it is touched at the bottom of the button. How can I make the region bigger so it's easier to click/touch?

gary-unikronsoftware

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 74
    • View Profile
Re: How to enlarge the touch area (collider) of a tk2dUIItem?
« Reply #1 on: July 19, 2013, 09:59:58 am »
Hi,

If you haven't already, click on the 'Fit' button under 'Tk 2d UIItem > Collider > Automatic Fit' which should set the collider size to the same size of the button.

If this doesn't work, it may be the collider for the button is largely 'behind' another object or collider, try moving the button to a different area of the screen to see if that detects it.  Or it may be that the button's sprite also has a collider enabled on it, which is eclipsing most of the collider on the UIItem.  If that's the case then disable the sprite's collider.

If none of that works, can you post a screen shot with the UIItem button in scene mode?

Thanks.