Place an object on the nearest "available" area

I have a building system where when I click on a icon, I buy the object and then place it down (an object is created which hovers on my mouse and when I press a button it places down the actual object)
I would like to create an area/zone where the building can only be placed. So the building is placed inside walls and that I don’t have to pixel perfectly place buildings on the ground. I am not quite sure how to go about make such area/zone. Thanks for reading and or helping.

You can use the grid system. Try searching “grid” in the examples.
Or you can put invisible placeholders. I think the “Pairs” example demonstrates this.

Is it possible to remove parts of the grid while playing and make/change the grid?

You can setup a visible grid in the scene editor to help you place objects, but on the events side, you get the grid positions by doing math, so you can use/change/disable it as you like by using different events.
Better open the example and see for yourself. :slight_smile:

1 Like

Alright then. Thank you

1 Like