When the application is resized (eg: using AndroidHarnessFragment and coming from another activity) the aspect ratio of every viewport is re-fixed overriding the left and right values.
When AndroidHarnessFragment.reshape
is called, it calls LegacyApplication.reshape
, what calls RenderManager.notifyReshape
, wich, in turn, calls Camera.resize(w, h, true)
for every viewport.
com.jme3.renderer.Camera
public void resize(int width, int height, boolean fixAspect) {
this.width = width;
this.height = height;
onViewPortChange();
if (fixAspect /*&& !parallelProjection*/) {
frustumRight = frustumTop * ((float) width / height);
frustumLeft = -frustumRight;
onFrustumChange();
}
}
The frustumRight and frustumLeft values seems to be wrong calculated. As it is, it breaks any custom aspect it has. Shouldn’t this method be aware of the current aspect (which can be calculated from the current height, width and it frustum values) while setting the new right/left?