Is there no method (like there is for flyCam.setMoveSpeed()) to change the speed of the zoom? or is it so obvious that i just don’t see it?
Hi,
maybe you could use frustrumXXX() methods like this:
//declaration
float b, t, l, r;
@Override
public void simpleInitApp() {
…
storeCamFrustum(); //called once only
…
}
//method definition here
private void storeCamFrustum() {
b = cam.getFrustumBottom();
t = cam.getFrustumTop();
l = cam.getFrustumLeft();
r = cam.getFrustumRight();
}
and then using Triggers (Mouse or Key + inputMappings, actionListener you call)
setCamZoomLevel(float val); // float val = 2f or 0.5f depending on if you want to zoom in or zoom out ; → not smooth
public void setCamZoomLevel(float val) {
cam.setFrustumBottom(b * val);
cam.setFrustumLeft(l * val);
cam.setFrustumTop(t * val);
cam.setFrustumRight(r * val);
}