hi together,
im using a thirdperson handler and a chase camera. the chase camera is updated like this:
chaser.update(tpf);
float camMinHeight = 2f;
if (!Float.isInfinite(camMinHeight) && !Float.isNaN(camMinHeight)
&& cam.getLocation().y <= camMinHeight) {
cam.getLocation().y = camMinHeight;
cam.update();
}
float characterMinHeight = 2f;
if (!Float.isInfinite(characterMinHeight) && !Float.isNaN(characterMinHeight)) {
m_character.getLocalTranslation().y = characterMinHeight;
the third person handler is setuped like this:
HashMap<String, Object> handlerProps = new HashMap<String, Object>();
handlerProps.put(ThirdPersonHandler.PROP_DOGRADUAL, "true");
handlerProps.put(ThirdPersonHandler.PROP_TURNSPEED, ""+(1.0f * FastMath.PI));
handlerProps.put(ThirdPersonHandler.PROP_LOCKBACKWARDS, "false");
handlerProps.put(ThirdPersonHandler.PROP_CAMERAALIGNEDMOVE, "true");
input = new ThirdPersonHandler(m_character, cam, handlerProps);
input.setActionSpeed(100f);
input.setEnabled(false);
and the chase camera is like this:
Vector3f targetOffset = new Vector3f();
targetOffset.y = (((BoundingBox) m_character.getWorldBound()).yExtent+10) * 1.5f;
targetOffset.x = (((BoundingBox) m_character.getWorldBound()).xExtent+10) * 1.5f;
targetOffset.z = (((BoundingBox) m_character.getWorldBound()).zExtent+10) * 1.5f;
chaser = new ChaseCamera(cam, m_character);
chaser.setTargetOffset(targetOffset);
now my problem is, that the camera doesn't zooms far out. it only zooms a little bit out. where and how can i define how far the camera should zoom out? zoom in is no problem but zooming out doesnt works far engouh.
then the second problem is... i can move the camera with the mouse. but its not possible to move the camera in this way that the camera is really perpendicular to the ground respectivley the node the chase camera is following.
does anybody know how and where to solve this?
thx sebastian