Hello Guest

Author Topic: tk2dUIItem support mesh collider?  (Read 5127 times)

Martin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 17
    • View Profile
tk2dUIItem support mesh collider?
« on: July 06, 2013, 07:50:06 pm »
I'm trying to use a User Defined Collider Mesh with a tk2dUIItem but can't get it to work. If I replace it with a box collider it works as expected. Are mesh collider supported with tk2dUIItem?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dUIItem support mesh collider?
« Reply #1 on: July 06, 2013, 07:59:18 pm »
It will only work if you have front caps on the collider, i.e. somewhere for the ray to hit it.
Is it enabled?

Martin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: tk2dUIItem support mesh collider?
« Reply #2 on: July 06, 2013, 08:55:04 pm »
I turned on "Convex" and now it is working, is that the front cap?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dUIItem support mesh collider?
« Reply #3 on: July 06, 2013, 09:02:40 pm »
No, but convex colliders always are closed, they don't need caps.
Under collider type, there is a setting "Collider Cap". Set that to front and back and that'll sort it out for you.

Martin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: tk2dUIItem support mesh collider?
« Reply #4 on: July 06, 2013, 09:14:46 pm »
I changed it to Front and all working perfect now, thanks!
« Last Edit: July 06, 2013, 09:17:26 pm by Martin »