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