- Home /
How to fix multiple camera clipping problem.
So I made my game in the unity editor and experienced no camera clipping problems. However, when I built my game to mac standalone, I saw there were some weird changes. For some reason my cameras are clipping wrong only in the app, but not in the editor. I changed the near and far clipping planes, but now I get this weird thing on my screen, you should be able to see in the image below: (You'll have to look closely) Around the edges of the level there is something being displayed, like another camera. I think it has something to do with that I have two cameras sharing one screen, but i'm not sure exactly. Here is another problem in this level: As you can see, there are some lines around certain objects in this scene when there shouldn't be. If you look at the other picture, you'll see that the lines aren't around the player any more. This is because the player is in a different position in this image, and for some reason the lines are sometimes there, sometimes not. (Depending on the players/cameras position).
If anyone knows what is going on, please leave an answer below. I would greatly appreciate it, thanks : )
How may cameras do you have in your scene and for what? (if you have more than one).
Thank you for commenting : )
I have two cameras in my scene, one on the left, and one on the right. These cameras follow one of the two players on the screen, (those would be the spheres). The white line in the middle of the first image, is the line separating the two cameras.
What's the clear setting on the cameras? It looks like they're only clearing depth and you're seeing remnants of the last frame's render.
Try to change the option, to any that it's not sky to see if that solves the problem, if not, have you already set the camera width to make it looks like a split camera?.
I changed it to solid ins$$anonymous$$d of sky, but that didn't work. I also checked to see if the cameras were overlapping, but they weren't. The camera on the right's X viewport is set to 0.5, and the camera on the left's viewport is set to -0.5
Well i've found that when I decrease the far plane, it shrinks the weird things going on with the cameras. However, it also starts to cut away at the rest of the level. Does any of this help?
So I switched the cameras to solid again, and found that the skybox is part of the problem. The skybox for some reason is the weird depth problem around the level, I have yet figure out why. However, there are still those lines around the characters and objects, which I think are connected to the far/near clipping planes.