Question by
rachmadrin · Jul 13, 2016 at 02:03 AM ·
ui imageevent triggering
How to make an event when 2 UI Image touching ?
I want play sound when 2 image are touching each other. Sorry for my bad english. :)
Comment
Best Answer
Answer by LightSource · Jul 13, 2016 at 05:33 AM
Attach a box collider to them and make sure they have a Rigidbody2D component attached as well. Check if the colliders have correct dimensions too, or else collisions may fire incorrectly.
However, UI objects aren't really for this kind of thing. I don't know your situation, but if you're looking for run-of-the-mill type UI, you might want to use sprites instead.
Take care.
Thank you, sir. I'll try. I'll tell you if it works. :)