I’m looking for a way to create a cube that can project whatever’s behind it, like a window. Something that could be used without having to create a new mesh for whatever the window would be used to see through. I’ve been trying to create this effect using a Render Texture, but I can’t seem to find a way that makes it work well.
You can create two cubes in a cross pattern or make a 3d model of a window, because that would be much easier.
Please take a look at this page.
If you are using a texture on the cube, the texture image needs to have an appropriate [alpha][2]-value.
If not, you may simply do the following:
-
Create a cube.
-
Create a new material
-
Set the Material of the cube’s “Mesh Renderer” to our new material.
-
Set the material’s Rendering Mode to Transparent
-
Change the alpha-value of the material’s Albedo colour
By changing the material’s alpha value, you can make it transparent/semi-transparent.
If you want a windows inside your cube, as you write in your comment above, you could create a texture for your cube and let part of the texture be transparent (by changing the alpha values at that part of the texture)