2D Toolkit Forum

2D Toolkit => Support => Topic started by: Martin on July 06, 2013, 07:50:06 pm

Title: tk2dUIItem support mesh collider?
Post by: Martin 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?
Title: Re: tk2dUIItem support mesh collider?
Post by: unikronsoftware 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?
Title: Re: tk2dUIItem support mesh collider?
Post by: Martin on July 06, 2013, 08:55:04 pm
I turned on "Convex" and now it is working, is that the front cap?
Title: Re: tk2dUIItem support mesh collider?
Post by: unikronsoftware 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.
Title: Re: tk2dUIItem support mesh collider?
Post by: Martin on July 06, 2013, 09:14:46 pm
I changed it to Front and all working perfect now, thanks!