Demonstration video: HERE
I was making a first person maze game in P3D and encountered this problem. It seems like when I get too close to an object, I see through it. The camera haven’t even reached the surface of the object.
This is the code I use to control the camera:
camera(cam.x, cam.y, cam.z, cam.x+direction.x, cam.y+direction.y, cam.z+direction.z, 0, 0, -1);
Does anyone know why this happens and how to solve it?