Hi guys!
I have extended simple game and been doing ok. But i have a problem that the camera can be moved upwards an infinite amount. I would like to set it so the camera will not go past y = 0.7. to this end I tired:
Vector3f cameraDirection = cam.getDirection();
if (cameraDirection.getY() >0.7f){
cameraDirection.setY(0.7f);
cam.setDirection(cameraDirection);
}
It does not do anything apart from make the camera jump to an upside down view after the camera has gone over the upper vertical limit.
any help will be much appreaciated