- Home /
Collision between UI element and GameObject
When I first started to develop in Unity I followed the Unity Tutorial for the Space Shooter 2D game and used the knowledge from that to create something myself. Looking at it now it may not have been the best idea.
Currently my game is 2D but in a 3D environment where the camera is top down and I am trying to figure out how I can detect a collision between a UI Image and my Player GameObject.
Any help will be extremely appreciated!
$$anonymous$$ore info would be good, but these are some options/fixes:
1) add sprite renderer to an object and then an image on it, ins$$anonymous$$d of using UI Image 2) add colliders 3) check if the positions are set so that they collide (same y position)
Answer by djpiper28 · Mar 07, 2016 at 08:46 PM
Try making the collision box for the UI element have a larger Y value and // or make a clone which isn't a trigger