- Home /
Unwanted lines in endless 3D game
Hi everyone,
In my endless running game there's unwanted lines which is seen in my endless android running game (Kindly go through the image attached).
Please Help
Thanks in advance
Answer by Destran · Mar 18, 2014 at 01:06 PM
At first I thought you meant the yellow line and I was confused. But I take it you mean the lines at the end of each house. Looking around googele, it seems there's a couple of ways you can get rid of the lines.
If you go to scene view and select all your desired gameObjects(I'm assuming each house is a gameObject or something like that) Edit>Snap Settings > Snap All Assets. It will combine them all and get rid of the line.
But since you said this is an endless runner I don't think that's what you need.
So taking Jamora's answer from: http://answers.unity3d.com/questions/503574/can-objects-snap-together-in-game-without-a-grid.html
You could try:
You can use Physics.OverlapSphere on the newly instantiated cube to get all nearby other Units, then do a simple sort (example in GameObject.FindGameObjectsWithTag, middle one) to get the closest one. The actual snapping would be done by first parenting the new unit to the closest one, then adjusting the x,y position to begin at exactly where the other unit ends. Because you're using cubes, this can easily be done using renderer.bounds
Hope this helps!
Answer by haim96 · Mar 18, 2014 at 01:16 PM
does these line also appear when running the game? in my project i have scene that contracted from several objects, i also have these line in editor but the disappear in run time. any way you should make sure that the texture is seamless and each new part section doesn't overlap the previous one.
Your answer
Follow this Question
Related Questions
Problem with HashSet 1 Answer
Wrong placing for background 0 Answers
music loops specific time of the song 2 Answers
Obstacle loop 0 Answers
Make value change to anoter over time and back loop 3 Answers