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));