The main difference is that you use only boxes whereas the doc is manipulating vertices to build walls doors windows and such. I would suggest to stick to the doc approach which will prevent having to reconcile edges like this.
You can get the vertex array by doing mesh.getVerticesData("position") but you will have to find which vertices correspond to the corner(s) and update their coordinates yourself, by applying some maths calculation. Once the array is updated, you can set the new vertices on the mesh by doing mesh.setVerticesData("position", newarray).
The positions array of a mesh you make using .createBox will have 8 sets of 3 equal vector3 coordinates that correspond to each corner of the 6 faces. And you can move the corners by updating each all 3 coordinates.
If you want to have arbitrary angles to your walls and have the corners be clean it will be MUCH easier in my opinion to forget about transform (scaling rotation and position) and use world coordinates for the corners of all your walls and figure out what the world coordinate are using plane math.
If you’re curious about this approach let me know and I can make a playground to demo what this looks like.
Cool!! I am trying to figure out how to take this concept and dynamically create walls as I click on the ground. I should also consider creating outer walls and inner walls. Furthermore, I cannot see the top and bottom faces of the mesh.