Nifty GUI - ChaseCam rotates strange after using the GUI

Hey, :slight_smile:

I’m using jME3 with the latest nightly build. I’m creating a simple GUI, that contains a button to start a game.

The screen controller has a method called from the GUI to actually close it and initialize the game. This works fine. :slight_smile:

But after using the gui (moving the mouse around and click on the button), the camera rotates weird. It looks like it “rolls” extremly to the sides.

Debugging showed me, that this problem occurs after moving the mouse in the GUI. The following variations work: (the camera behaves normally)

  • Starting the application directly
  • Starting the applocation after a timeout of a few seconds (without moving the mouse or doing any other interaction with the GUI)
  • Creating the GUI, show it, close it and starting the application

    So the problem has something to do with events triggered in Nifty… I guess, nifty doen’t loose the focus right or something like that…

    I’m working on a testcase, but maybe you know what I’m doing wrong.

    destro :slight_smile:

    EDIT: A few hints, just to go sure. I’m closing the GUI by just calling:


    I’m also using inputManager.setCursorVisible(true / false) a few times, but that seems not to be the problem, because these methods are also called in the third variant (see above), that works.

Hm… It works now by using:


at the start of the program. This also calls internally:


It’s strange, because I’m doing this in my code later, too. But it seema, that although the flyCam is disabled in the game, it has to have a dragToRotate = true property.

Otherwise, it influences the chaseCam when moving the mouse around. Seems to me like a bug, maybe you have to check internally at this point also, if the flyCam is disabled.

If not, correct me please. :slight_smile: