- Home /
Camera seeing through plane when near its edge
I have a really strange situation going on and i have no idea what the problem is. I have a plane (actually 2 planes) set between the camera and the game map. They are intended to be used for fog of war. But, when the camera nears the edge of the planes a hole seems to appear in the planes in front of the camera, the closer to the edge i get the larger the hole becomes.
Here is a picture far enough away that the plane looks normal:
Here is a picture at the edge where part of the camera's viewport is over the side of the plane:
Any one have any idea why this is happening ?
edit - I have discovered that the problem originates from the shader used on the hexagon grid that shows through the plane, it is using unity's built in transparent/diffuse shader. If i change it to diffuse the problem desists, but of course i don't get the effect i need. Any one know how i can solve this?
I am now, but when the problem originated i wasn't, also this has occurred before but i ignored it as i was getting rid of the plane any way.
Actually you were on the correct lines, i've narrowed down the problem, after discovering it was the hex grid that was the problem rather than the plane.
The hex grid is using transparent/diffuse shader, if i switch it to diffuse then the problem goes away. but obviously I dont get the effect i need then.
Then you're having z-fighting issues it looks like.
Try increasing the separation between the planes a little more.
Answer by Piesk · Oct 31, 2013 at 04:27 PM
I have discovered the problem, but it has led to a seperate question so I will close this one and open a new one.
Answer by WhipJr · Oct 30, 2013 at 11:16 AM
Have you checked your Near clipping Plane on the camera? default is set to .3 normally.
Yeah i don't think that's the issue, the planes are 0.5 away with 0.3 near clipping plane, and it only happens when i near the edge of the plane.
Your answer
Follow this Question
Related Questions
Understanding Texture Atlasing 0 Answers
Error CS8025: Parsing error. HELP! 1 Answer
Plane intersection creates light artifact 2 Answers
Double-sided cross section ("slice") 0 Answers
Strategys for reducing draw calls 3 Answers