From a9d676a5fdcad871cd89d32e122821efd78c83ab Mon Sep 17 00:00:00 2001 From: seanpringle Date: Tue, 14 Jul 2020 18:36:22 +1000 Subject: [PATCH] scale perspective top calc for near culing plane (#1309) --- src/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index 91ce0ca3e..8e1e44cf8 100644 --- a/src/core.c +++ b/src/core.c @@ -1443,7 +1443,7 @@ void BeginMode3D(Camera3D camera) if (camera.type == CAMERA_PERSPECTIVE) { // Setup perspective projection - double top = 0.01*tan(camera.fovy*0.5*DEG2RAD); + double top = RL_CULL_DISTANCE_NEAR*tan(camera.fovy*0.5*DEG2RAD); double right = top*aspect; rlFrustum(-right, right, -top, top, RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);