Hi has anyone go this to work, this is what I'm trying to achieve in my map editor...
1) Create a cube.
2) Create another cube right next door to the first cube.
3) Remove the surfaces (walls) between the 2 cubes to make a 'room' of 2 cubes.
I guess I need to use clear surface but if I do that on a surface of the cube then the entire cube disappears...
Any ideas how this can be achieved?
Instead of using cubes just use wall faces i.e. a single face of a cube.
Make a 2D or 3D array which holds the wall positions (1) and empty spaces (0) , for example
1111111111
1000000001
1000000011
1111100011
1000000001
1111111111
then loop through the array, if theres a (0) then add a floor and ceiling surface to the mesh.
If theres a (1) check the array above,below,left and right of the current position to see if you need to add a wall face to the mesh.
This way you use minimal surfaces/verts and triangles to build your level so theres no need to go back and delete faces after.
Swift has a function to remove overlapping cube faces in code archives.
Rob,
do you know where it is cos the search feature don't work on the forums these days :-(
Shamber I don't want 'big' rooms i.e. I just want to connect cubes to together to make a 'rat-run'. How about I create 2 custom entitys, one with 1 face missing and one with 2 faces missing, then put them all together.
A blitz surface doesn't equal a single face. A whole landscape can be represented in a single surface.