Restrict Mouse axis

Hey Guys,
Im making my own Game with JME3. Now i have one problem: The player can make a 360 Flip. So he can turn to the ground and even more. How can I restrict the Camera position to max. the feeds?

http://hub.jmonkeyengine.org/forum/topic/simple-camera-flip-fix-code/

@javagame said: http://hub.jmonkeyengine.org/forum/topic/simple-camera-flip-fix-code/

Cant get it into my code. Could you help me with this? Cause i dont youse any “Private SimpleApplication app;” i start it directly over the main class. Could you help me with this?

the code there is an AppState class.

you’ll want to copy the whole thing in to your own “CameraLockState.java” file then create an instance of the class and add it to your statemanger. eg. “stateManager.attach(new CameraLockState());”

@icamefromspace said: the code there is an AppState class.

you’ll want to copy the whole thing in to your own “CameraLockState.java” file then create an instance of the class and add it to your statemanger. eg. “stateManager.attach(new CameraLockState());”

Man, i really really thank you! It´s now working perfectly! I love you for this explanation <3 :smiley:

1 Like