Hello!
I am currently working on a project that requires the ability to place items on a grid system (some objects will be ‘L’ shaped and such), I was wondering what the best way would be to implement that onto terrain? Also if it is possible to make it so I can have multiple layers i.e. you can see the “outside” terrain (trees, grass, rivers) and move into an indoor setting like a mountain which phases out the outside world. The best example I can think of would be similar to the “Evil Genius” game, but with multiple layers.
Last but certainly not least, I have been playing around with the camera settings and cannot quite get it having a free-flow camera constrained to a required terrain you can build on? (I don’t want people flying off of the map, that would not be good)
Grid based I don’t exactly know what you mean but can be done easily.
When placing the object, check the location e.g. it is (25.6, 153.2) now and your grid is 10 blocks, round up those digits each tick. Which makes it (30, 150). You need to check the mouse pointer each second and snap it to the nearest grid.
Implement on to the terrain depends. If you want the grid to be visible all the time or only during sometimes. If its temporary, you can use a giant decal or static mesh anything can do.
The phasing can be achieved by teleporting the all the units to another place. There must be better ways but I don’t know.
Lock the free flowing camera to the bound location. Like if controller which controls the camera > some units, don’t make it move.