- Home /
Objects glitch between each other and the terrain
Im creating a small town scene modeled with blender. As I place my objects around they glitch when the game starts, I have a two parts of a wall that I want to put together to make one big wall, when I do this I have to overlap them so there's no gap in between. When I do this instead of you seeing one big wall the two walls glitch between each other so you can almost see both. This also happens between the ground and the object stood on it, even if it has a rigidbody and drops to the ground it begins to do the same. This only happens as I get further away, if I am stood right next to it, it still does it but not as much. This is a screenshot of it, its a lot worse when in motion. I hope someone can help.
Answer by sparkzbarca · Nov 10, 2012 at 09:11 AM
you cant lay them over the top of eachother that creates rendering issues when it can't figure out which to draw.
You just need to precisely lay them out.
cast a ray from the first wall to the second cay a ray from the second wall to the first
move distance = firsthit.point - secondhit.point
wall1.transform.position = move distance
the distance between the walls is now zero.
Is there a different way which doesn't involve coding because Im going to be having a lot of walls and to do this to every one of them will end in confusion. Im not even sure how to code it given your example has the error insert semicolon, which I have done. Could you explain a bit more please?
I just made the walls about an inch apart so they are not touching at all and as I start to walk away the same thing happens even on the highest graphic settings.
Answer by sparkzbarca · Nov 10, 2012 at 04:08 PM
in the editor?
Surface Snapping While dragging in the center using the Translate Tool, you can hold Shift and Control (Command on Mac) to snap the object to the intersection of any Collider. This makes precise positioning of objects incredibly fast.
there are other methods, all covered in the docs.
http://docs.unity3d.com/Documentation/Manual/PositioningGameObjects.html
Ive separated everything using that technique, but my houses and walls still glitch out. Also trees and grass do this in the terrain which I cant do anything about.
do you have the problem with primitives?
$$anonymous$$aybe its your models or surface normals? Try checking the calculate normals tickbox on the model, maybe you messed up something in blender.
Unity is on to version 4, its not Unity, a bug like that wouldnt go unnoticed. So it must be something your doing, most likely its in the model itself, the problem is most people who actually use unity know more about program$$anonymous$$g than modeling (you can get by with $$anonymous$$imal modeling skills, it'll just look bad, or you can download models) on the other hand coding is a prerequisite and beyond generic things like basic move and shoot your really going to have to program up your game yourself.
Your answer
Follow this Question
Related Questions
Two different terrains in one scene 2 Answers
all objects are abruptly disappeared 2 Answers
Buildings on Terrain 0 Answers
Rigidbody pops to the other side of the map 0 Answers
Put a map into Unity 0 Answers