I am making a city builder game and I wanted to know is there a way to check if an object collides with ANYTHING on the same layer (basically other objects like trees or roads)? I know you can just add it one by one but I don’t want my code to be bajillion lines long since I will add a lot of stuff later.
I have an object for display (so that you can see where it will be placed instead of placing it blindly) and I want to make it go red when you can’t place it there.
For now the only way I see is to make one condition for every object to check all the collisions.
https://cdn.discordapp.com/attachments/863001292796067860/1114591722761101372/image.png
This is how it looks like now only to check the collisions, it will only get worse because I plan on adding more stuff to the game.