hi togehter,
i made an application which uses a thridpersonhandler. know i want to start implementig a GUI. but the problem is, how can i split the fengGUI handler and the ThirdPersonHandler?
my problem is that if i want to move to the menu, the graphic of my application moves. but i want that only if im pressing the mouse Button AND move the mouse, the grpahic is moving, and if I only use the mouse movement, the menu is meant.
do you know how i can implement that?
thxx
i tried this pice of code:
protected void simpleUpdate() {
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;
}
MouseInput.get().setCursorVisible(true);
if (MouseInput.get().isButtonDown(0) == false) {
input.setEnabled(false);
}
}
/**
* setups the input handlers
*/
private void setupInput() {
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);
}
but it didnt worked correctly. just the movement with wasd was disabled :(