listener.setLocation(camNode.getCamera().getLocation());
listener.setRotation(camNode.getCamera().getRotation());
}
private void setupKeys(InputManager input) {
input.addMapping("left", new KeyTrigger(KeyInput.KEY_A));
input.addMapping("right", new KeyTrigger(KeyInput.KEY_D));
input.addMapping("forward", new KeyTrigger(KeyInput.KEY_W));
input.addMapping("backward", new KeyTrigger(KeyInput.KEY_S));
input.addMapping("jump", new KeyTrigger(KeyInput.KEY_SPACE));
input.addMapping("center", new KeyTrigger(KeyInput.KEY_2));
input.addMapping("crouch", new KeyTrigger(KeyInput.KEY_LSHIFT));
input.addMapping("camera", new KeyTrigger(KeyInput.KEY_F));
input.addMapping("shoot", new MouseButtonTrigger(0));
input.addMapping("head_left", new MouseAxisTrigger(0, true));
input.addMapping("head_right", new MouseAxisTrigger(0, false));
input.addMapping("head_up", new MouseAxisTrigger(1, false));
input.addMapping("head_down", new MouseAxisTrigger(1, true));