Hello everyone, I’m currently working a 2.5D building game where players can place different kinds of structures inside a building to build it floor by floor.
Whenever something is built the game places another “building” behind it called the floor, this is necessary so that when a building is removed the story above isn’t floating in the air but has some kind of support underneath; the floor is always moved and stretched around by the game so that it always matches the space used by the buildings.
Right now all the buildings are just cubes stretched out in different rectangular shapes with a single texture applied to them, it has worked well enough up until now.
However, when I wanted to introduce a structure that has glass windows you can see through I noticed I can’t actually see through them at all. I thought I got the material’s transparency or the texture settings wrong but it turns out I’m simply seeing the floor through the windows.
The situation is basically as follows
That long grey thing is the floor, it is positioned almost exactly as a building, it’s just slightly thinner so the textures don’t overlap, in other words it’s actually “inside” the cube mesh representing the building.
The problem here of course is that the front face has those see-through windows that let you see the floor, when they should let you see the sky behind instead.
I’m not sure how to get out of this predicament; the most obvious solution would be to not make the floor go through buildings at all, but that would make it much more complicated, the floor would need to be split and merged constantly when buildings are added or removed.
It would be much simpler if I could tweak my mesh or the material so that the transparency acts as expected, or some other solution I’m not seeing right now… does anyone know how to achieve the desired effect?
Thanks in advance