- Home /
Textures bugs when two GameObjects are too close
Hi! This is something that happens to me very often. I need two GameObjects to collide with each other, but their textures start to bug, like it changes from the perspective you are seeing it (see attached picture, the wall texture seems to collide with the floor). Is there any way to solve this, or is it just a Unity graphic issue?
Thanks!!
Answer by HawkSandwich · Jun 16, 2017 at 08:39 AM
This is what's sometimes called "z-fighting". It's not an issue, it's just something that happens in 3D computer environments if you're not careful.
If two objects occupy the same space, and nothing tells you which one should be rendered last (which one should show up), which one should you show? Well, the computer's answer is "let's show both!" so you have this weird glitch.
The solution is simple: don't have two planes occupying the same space. That bit on the floor there, if you want it to show up, drag it up a little in your modelling program. Otherwise drag it down a little, or even delete it if it's not needed.
Your answer
Follow this Question
Related Questions
Dynamic Texture Mask 0 Answers
can we use same material and same mesh with different texture scaling in the project.....??????? 1 Answer
How to combine materials at runtime? 1 Answer
Best method for implementing alternative view modes? (like Cities: Skylines "Info View") 0 Answers
Random Tiling Textures 0 Answers