Mouse Left Button Input doesent work

Hello,
why all work fine but only the rotation if I press the Left or right Mouse Button doesent work?
[java]
private void initInput()
{
inputManager.addMapping(“Pause”, new KeyTrigger(KeyInput.KEY_P));

    inputManager.addMapping("Left", new KeyTrigger(KeyInput.KEY_LEFT));
    inputManager.addMapping("Right", new KeyTrigger(KeyInput.KEY_RIGHT));
    inputManager.addMapping("Up", new KeyTrigger(KeyInput.KEY_UP));
    inputManager.addMapping("Down", new KeyTrigger(KeyInput.KEY_DOWN));
    
    inputManager.addMapping("RotateLeft", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
    inputManager.addMapping("RotateRight", new MouseButtonTrigger(MouseInput.BUTTON_RIGHT));

    inputManager.addListener(
    new ActionListener() 
    {
        public void onAction(String name, boolean isPressed, float tpf) 
        {
            if(name.equals("Pause") && isPressed == false)
            {
                isRunning = !isRunning;
            }
            
            if(isRunning)
            {
                if(name.equals("Left"))
                {
                    geometryPlayer.move(2 * tpf,0 , 0);
                }
                else if(name.equals("Right"))
                {
                    geometryPlayer.move(-2 * tpf,0 , 0);
                }
                else if(name.equals("Up"))
                {
                    geometryPlayer.move(0, 2 * tpf, 0);
                }
                else if(name.equals("Down"))
                {
                    geometryPlayer.move(0, -2 * tpf, 0);
                }
                else if(name.equals("RotateLeft"))
                {
                    geometryPlayer.rotate(1 * tpf, 0, 0);
                }
                else if(name.equals("RotateRight"))
                {
                    geometryPlayer.rotate(-1 * tpf, 0, 0);
                }
            }
        }
    }
    ,"Pause", "Left", "Right", "Up", "Down", "RotateLeft", "RotateRight");
}

[/java]

Have you put a break point in or tried printing something out in those if blocks, to make sure it isn’t actually being called?

1 Like

Yes I have tried to print something out, but nothing happens…

well it should work fine. Did you smash your mouse on the floor?

1 Like

:smiley: no !

just checking. Make a simple test case, that we can look at, and you may find the issue somewhere yourself, perhaps isRunning is false for some reason?

1 Like

mh I have removed the code and write it again.
Now it works…