Constructing buildings on a plane in game mode

Hello!
Are there examples of how building creation works in game mode. We have a plane divided into squares, in each square you can build buildings, like a Sims city or Warcraft 3. we have a grid.

How can you implement this on Three.js?

image

There is an official example from the repository that demonstrates a simple voxel editor. You should be able to use parts of the code in order the implement the positioning of game entities onto the plane.

https://threejs.org/examples/webgl_interactive_voxelpainter

1 Like

Many thanks!

Help please, I want an imported 3D object to be created instead of a cube in formats: gltf, obj
now i am getting error.