- Home /
[NGUI] Mesh collider not receiving events
I'm using NGUI to drag and drop UISprites. However, I want to be able to click only on the opaque parts of the sprite's image, so I created a mesh of the image using UCLA Mesh Creator.
Using a box collider, my UISprite looked like this, and works fine ("Box Configuration"):
UISprite (collider: auto-adjust to match)
UIDrag Drop Item
Box Collider
Problem is, the box collider includes transparent parts of the UISprite.
Using a mesh collider, my UISprite looks like this ("Mesh Configuration"):
UISprite
UIDrag Drop Item
Mesh Collider (referencing the mesh I created with Mesh Creator)
The collider isn't receiving events.
ArenMook says the mesh collider must have volume, so the mesh I've created with Mesh Creator is a 3D mesh. To verify this by displaying the mesh, I added a Mesh Renderer component (referencing the Mesh material created by Mesh Creator) and a Mesh component to the Mesh Configuration above. However, the mesh doesn't appear.
To summarize:
How can I receive events on a mesh collider attached to a UISprite?
How can I display this mesh so I can verify its position/scale?
I'm a noob so I really appreciate your help. Thank you in advance!
Your answer
![](https://koobas.hobune.stream/wayback/20220613164857im_/https://answers.unity.com/themes/thub/images/avi.jpg)