diff --git a/jme3-core/src/main/java/com/jme3/renderer/Camera.java b/jme3-core/src/main/java/com/jme3/renderer/Camera.java index 35f9b8d806..e623d392f8 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/Camera.java +++ b/jme3-core/src/main/java/com/jme3/renderer/Camera.java @@ -1344,10 +1344,14 @@ public void onFrustumChange() { coeffTop[0] = -frustumNear * inverseLength; coeffTop[1] = frustumTop * inverseLength; } else { - coeffLeft[0] = 1; + // getLeft() returns upĂ—direction, but the view matrix (fromFrame) + // uses directionĂ—up = -getLeft() as its X axis. Negate the left/right + // coefficients so the frustum plane normals match the view matrix, + // giving correct culling for any camera orientation. + coeffLeft[0] = -1; coeffLeft[1] = 0; - coeffRight[0] = -1; + coeffRight[0] = 1; coeffRight[1] = 0; coeffBottom[0] = 1;