How to remove default camera movement?

i don't realy remember i did it once, and i need it again for a Pong game, since i want to move the pong board with the mouse, i don't want the camera moving too!



tryied things like KeyInputHandler.removeAll() or anything like it, but i can't find the MouseInputHandler or wathever i should call the "removeAll" to cancel it.



if i use cameraInputHandler.removeAll() it returns:


SEVERE: Exception in game loop
java.lang.NullPointerException
        at com.jme.input.InputHandler.removeAllActions(InputHandler.java:374)
        at Main.initImput(Main.java:68)
        at Main.simpleInitGame(Main.java:56)
        at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:544)
        at com.jme.app.BaseGame.start(BaseGame.java:74)
        at Main.main(Main.java:41)
17/03/2009 13:52:21 com.jme.app.BaseSimpleGame cleanup



i just don't know where to look at!

In short, cameraInputHandler.setEnabled(false) will disable the camera/mouse movement.



If you are creating an input handler at the init phase of your game, you can call setEnabled(false) to disable it, then the camera won't move with your mouse. If it is a FirstPersonHandler that you created then you will want to disable it in order to stop the camera moving with your mouse. You can then re-enable it later. If you create a regular InputHandler, you will want to create your own mouse input that will listen for mouse movement and move your pong board object accordingly.



MouseInput.get().addListener(new MouseInputListener() {

   public void onMove(int delta, int delta2, int newX, int newY) {
      // Trace a ray with the mouse to a plane where your pong board is. Keep that
      //  intersected position then move your pong board to it.
   }
   
   public void onButton(int button, boolean pressed, int x, int y) {
      // ignore if you want
   }
   
   public void onWheel(int wheelDelta, int x, int y) {
      // ignore if you want
   }
}



I used a method similar to the above, in the onMove method I had the mouse trace a ray into a plane where I wanted the object to move along, then I updated the object's translation based on that intersection with the mouse and plane. The result was that when I moved the mouse the object moved with it.
(I might have actually done the translation update in the update method of the gamestate, give it a try either way)

woot it worked, actualy i just don't want the camera to move at all using the mouse, since my "Pong Player Block" will be moved using the mouse, and it won't work if the damn camera is moving too ;D