Input issue when switching camera

Hi. When I try to switch camera (in a class that extends SimpleGame) it works fine until I touch my mouse. It seems that the input makes the corresponding inputhandler set the renderers camera to the inputhandlers camera. Is there any way to avoid this? My current try is:



   private void setCamera(int camNr) {
        switch (camNr) {
            case 0:
               input = chaseInput;
               cam.update();
                display.getRenderer().setCamera(cam);
                break;
            case 1:
               input = overviewInput;
               overviewCam.update();
                display.getRenderer().setCamera(overviewCam);
                break;
            default:
                break;
        }
    }



where the inputhandlers are set up as follows:


      HashMap chaserProps = new HashMap();
      chaserProps.put(ThirdPersonMouseLook.PROP_ENABLED, "false");
      chaserProps.put(ChaseCamera.PROP_STAYBEHINDTARGET, "true");
      chaserProps.put(ChaseCamera.PROP_WORLDUPVECTOR, new Vector3f(0f,0f,1f));
      chaserProps.put(ChaseCamera.PROP_TARGETOFFSET, new Vector3f(0f,0f,10f));
      chaseInput = new ChaseCamera(cam,rootNode,chaserProps);




      overviewInput = new InputHandler();
      overviewInput.addToAttachedHandlers(new KeyboardLookHandler(overviewCam, 50f, 1f));

I think this is due to the cameras update method updating the lwjgl camera whether or not it is the renderers camera or not. @other devs: This can be considered a bug, can't it?



@sthorsen: to avoid it simply deactivate the input handler for the other cam while the camera is not the current one used.


I would say that yes, lwjgl camera calls should only be made if the camera is "in context" ie. it is the current camera whether that is renderer or texturerenderer