NodeHandler and NodeMouseLook.setLockAxis

com.jme.input.NodeHandler locks the axis for mouse look to the target node's rotation during construction, but I need the lock axis to be null:



private void setUpMouse( Spatial node, float mouseSpeed ) {
        RelativeMouse mouse = new RelativeMouse("Mouse Input");
        mouse.registerWithInputHandler( this );

        NodeMouseLook mouseLook = new NodeMouseLook(mouse, node, 0.1f);
        mouseLook.setSpeed( mouseSpeed );
        mouseLook.setLockAxis(new Vector3f(node.getLocalRotation().getRotationColumn(1).x,
                node.getLocalRotation().getRotationColumn(1).y,
                node.getLocalRotation().getRotationColumn(1).z));
        addAction(mouseLook);
    }



Here are the options I can think of:
- provide an option during contruction for a lock axis so it can be set it to null
- hold mouseLook as a private instance variable and create a getter method for public access so I can do input.getMouseLook().setLockAxis(null);  (IMO the most flexible)
- copy/paste the NodeHandler code into my own handler class and modify to fit my needs. My code is a hacked prototype now, do most people roll their own handler anyway?

The player and camera in my game can essentially be upside down, so if the mouse axis is locked to (0, 1, 0) and the player is (0, -1, 0) the mouse left/right movements get inverted. If I edit NodeHandler and call setLockAxis(null) everything works how I need it to. Or am I completely off with all of this?

Thanks!