- Home /
How can I stop cubes from showing through each other when overlapped?
I'm having a problem with the default cubes. Whenever I overlap them, I get these brighter segments of wherever they overlap. You can see it **here**.
**Here** is an image of the material inspector settings.
The material I'm using is basically default. The shader is diffuse and there is no texture, just a solid color. The alpha value of the 'main color' is at 255.
I only started to notice this when I began to use a point light, which is what is used in this instance.
Is there any way to keep the overlapping, but not be able to see it, or will I have to create custom models that are a single object?
Odd. Can you post a screenshot of the material inspector settings applied to the cubes?
Updated the post. Not entirely sure if that's what you were asking for.
Answer by Patel-Sagar · Nov 27, 2014 at 07:43 AM
You can change z position of them in a way so that they not overlap exactly. but they have minor difference like 0.001 which is unnoticeable. e.g. one cube is at (0, 0, 0) and another is at (0.5, 0, 0.001). so that will solve your problem.
While this seems a tad dirty, it did work! I kind of had the same idea, but I was moving them way too much. Thank you.