Skip to content

Commit 6250b72

Browse files
authored
Merge branch 'jMonkeyEngine:master' into capdevon-fpp-cleanup
2 parents 59f7e66 + f7b69cf commit 6250b72

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jna = "net.java.dev.jna:jna:5.10.0"
2323
jnaerator-runtime = "com.nativelibs4java:jnaerator-runtime:0.12"
2424
junit4 = "junit:junit:4.13.2"
2525
lwjgl2 = "org.jmonkeyengine:lwjgl:2.9.5"
26-
lwjgl3-awt = "org.lwjglx:lwjgl3-awt:0.2.3"
26+
lwjgl3-awt = "org.jmonkeyengine:lwjgl3-awt:0.2.4"
2727

2828
lwjgl3-base = { module = "org.lwjgl:lwjgl", version.ref = "lwjgl3" }
2929
lwjgl3-glfw = { module = "org.lwjgl:lwjgl-glfw", version.ref = "lwjgl3" }

jme3-core/src/main/java/com/jme3/renderer/Camera.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,10 +1344,14 @@ public void onFrustumChange() {
13441344
coeffTop[0] = -frustumNear * inverseLength;
13451345
coeffTop[1] = frustumTop * inverseLength;
13461346
} else {
1347-
coeffLeft[0] = 1;
1347+
// getLeft() returns up×direction, but the view matrix (fromFrame)
1348+
// uses direction×up = -getLeft() as its X axis. Negate the left/right
1349+
// coefficients so the frustum plane normals match the view matrix,
1350+
// giving correct culling for any camera orientation.
1351+
coeffLeft[0] = -1;
13481352
coeffLeft[1] = 0;
13491353

1350-
coeffRight[0] = -1;
1354+
coeffRight[0] = 1;
13511355
coeffRight[1] = 0;
13521356

13531357
coeffBottom[0] = 1;

0 commit comments

Comments
 (0)