I added the thirdpersonhandler + chasecamera to my sky shooting game, it moves my model when i move my mouse left or right, but not when i am moving it up and down. I've looked in java docs for camera, chasecam, thirdpersonmouselook methods that might beable to change this, but havent had ne luck. can nebody help?
private void buildChaseCamera() {
Vector3f targetOffset = new Vector3f();
targetOffset.y = ((BoundingBox) player.getWorldBound()).yExtent * 1.5f;
HashMap<String, Object> props = new HashMap<String, Object>();
props.put(ThirdPersonMouseLook.PROP_MAXROLLOUT, "6");
props.put(ThirdPersonMouseLook.PROP_MINROLLOUT, "3");
props.put(ThirdPersonMouseLook.PROP_ENABLED, "true");
props.put(ThirdPersonMouseLook.PROP_INVERTEDY, "false");
props.put(ThirdPersonMouseLook.PROP_MOUSEXMULT, "1.0");
props.put(ThirdPersonMouseLook.PROP_MOUSEYMULT, "30.0");
props.put(ThirdPersonMouseLook.PROP_MAXASCENT, ""+45 * FastMath.DEG_TO_RAD);
props.put(ChaseCamera.PROP_INITIALSPHERECOORDS, new Vector3f(5, 0, 30 * FastMath.DEG_TO_RAD));
props.put(ChaseCamera.PROP_TARGETOFFSET, targetOffset);
props.put(ChaseCamera.PROP_STAYBEHINDTARGET, "true");
chaser = new ChaseCamera(cam, player, props);
chaser.setMaxDistance(8);
chaser.setMinDistance(2);
}
private void buildMovement(){
HashMap<String, Object> handlerProps = new HashMap<String, Object>();
handlerProps.put(ThirdPersonHandler.PROP_ROTATEONLY, "true");
handlerProps.put(ThirdPersonHandler.PROP_DOGRADUAL, "true");
handlerProps.put(ThirdPersonHandler.PROP_TURNSPEED, "3.1415");
handlerProps.put(ThirdPersonHandler.PROP_LOCKBACKWARDS, "true");
handlerProps.put(ThirdPersonHandler.PROP_CAMERAALIGNEDMOVE, "true");
handlerProps.put(ThirdPersonHandler.PROP_ROTATEONLY, "true");
handlerProps.put(ThirdPersonHandler.PROP_STRAFETARGETALIGN, "true");
handlerProps.put(ThirdPersonHandler.PROP_KEY_FORWARD, KeyInput.KEY_W);
handlerProps.put(ThirdPersonHandler.PROP_KEY_LEFT, KeyInput.KEY_A);
handlerProps.put(ThirdPersonHandler.PROP_KEY_BACKWARD, KeyInput.KEY_S);
handlerProps.put(ThirdPersonHandler.PROP_KEY_RIGHT, KeyInput.KEY_D);
handlerProps.put(ThirdPersonHandler.PROP_KEY_STRAFELEFT, KeyInput.KEY_Q);
handlerProps.put(ThirdPersonHandler.PROP_KEY_STRAFERIGHT, KeyInput.KEY_E);
mover = new ThirdPersonHandler(player, cam, handlerProps);
mover.setActionSpeed(50);
}
i need to make it so that the plane can go up and down too, not just left and right
ne help is appreciated, thanks.