Yeah that’s what I meant. This might not be helpful but I have it in my mind there was a bug that stopped you properly resizing viewports. I remember when I switched from 3.0 to 3.1 my game became distorted.
edit:
Hi,
for my game I want the 3D viewport to take up only 80% of the screen. The GUI should take up 100% of the screen as usual.
My trivial approach was to simply do this:
cam.setViewPortBottom(0.2f);
This works, but the aspect ratio of the rendered scene is now wrong; everything is squeezed together.
I tried to resize the camera with no avail:
cam.resize(1024, 768 * 0.8f, true);
Updating the frustum didn’t work, either. What is the correct way to change the main camera’s/viewport’s size?
A…
opened 12:29PM - 29 Sep 15 UTC
To be investigated
There seems to be a problem when updating the frustum, camera and/or viewport.
… Steps to reproduce:
1. Resize a viewport so it has another aspect ratio as before
2. Update camera aspect ratio
3. Notice that the resulting rendering is stretched
Please see this discussion for details, including code sample:
http://hub.jmonkeyengine.org/t/aspect-ratio-not-updated-when-resizing-viewport/33936/
Might be the problem you are having?
2 Likes