Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Agent_007 on November 25, 2013, 04:31:16 AM
-
Is there any easy way to use Mesh Colliders with NGUI buttons?
e.g. if I would like to do accurate hexagon shaped buttons that are right next to each other (~1 pixel between buttons) would it be possible with Mesh colliders?
Currently it seems that mesh collider only triggers with NGUI when Convex is ON, but naturally that breaks collider accuracy. It seems 2D toolkit has something like that (Collider Cap), but is there something similar in NGUI?
http://2dtoolkit.com/forum/index.php?topic=2052.0
-
When creating your collider mesh, just give it a volume (example: instead of a rectangle, create a cube).
-
Thanks. Your tip works.
It is a bit strange that a box collider works correctly with zero Z size, but with mesh collider one needs to have volume.
-
You can set its Z to 0 as well. It just needs to have a volume to start with. Box collider also has a volume.