Welcome,
Guest
. Please
login
or
register
.
March 27, 2025, 03:04:05 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Problem with using Mesh Colliders with buttons
« previous
next »
Print
Pages: [
1
]
Author
Topic: Problem with using Mesh Colliders with buttons (Read 2371 times)
Agent_007
Newbie
Thank You
-Given: 2
-Receive: 5
Posts: 27
Problem with using Mesh Colliders with buttons
«
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
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Problem with using Mesh Colliders with buttons
«
Reply #1 on:
November 25, 2013, 05:04:40 AM »
When creating your collider mesh, just give it a volume (example: instead of a rectangle, create a cube).
Logged
Agent_007
Newbie
Thank You
-Given: 2
-Receive: 5
Posts: 27
Re: Problem with using Mesh Colliders with buttons
«
Reply #2 on:
November 25, 2013, 05:56:12 AM »
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.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Problem with using Mesh Colliders with buttons
«
Reply #3 on:
November 25, 2013, 07:40:28 PM »
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.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Problem with using Mesh Colliders with buttons