- Home /
collider bounds intersect but than for a UI button element
I am using collider.bounds.Intersects() to check whether a tile is totally free of other other colliders. If that is the case I can build on the tile, else it is not possible to build.
This works perfect for gameobjects in the scene, however, I want to get the same functionality for a button on the canvas.
So same thing: There are tiles in the game which a player can press to build something. In the top right corner is a pause button and now if you accidentally press next to the button, you build something. I want the tile that is than pressed to first check if the button is intersecting with the tile and if yes, show a cross for short period to indicate it is not possible.
Please help.
Your answer
Follow this Question
Related Questions
Positioning gameobject on collider bounds. 1 Answer
Bounds is 0 when Instantiated 2 Answers
Converting Collider to Bounds variable? 1 Answer