NodeMouseLook.setLockAxis(Vector3f)

Hi all,

I was trying to confine the camera’s movement to only the y axis, so I did this:



NodeMouseLook look = new NodeMouseLook(mouse, node, 0.1f);
look.setLockAxis(new Vector3f(0, 1, 0));
addAction(look);


but I can still rotate up and down around the X axis.

I think this is because this is done in the method of setLockAxis(Vector3f):


   public void setLockAxis(Vector3f lockAxis) {
        this.lockAxis = lockAxis;
        rotateLeft.setLockAxis(lockAxis);
        rotateRight.setLockAxis(lockAxis);
    }



should be:


   public void setLockAxis(Vector3f lockAxis) {
        this.lockAxis = lockAxis;
        rotateLeft.setLockAxis(lockAxis);
        rotateRight.setLockAxis(lockAxis);
        lookUp.setLockAxis(lockAxis);
        lookDown.setLockAxis(lockAxis);
    }



But, lookUp and lookDown dont have a setLockAxis...

If there isnt a reason why they shouldn't have any, il add the needed methods.

DP

Ive made the changed locally, and they seem to work fine, except when you try and have full free movement (both x and y) you start getting into hassle by only moving diagonally.



Any thoughts?