here, i use this for my camera
float CameraAngleY=0.0f;
float CameraAngleX=0.0f;
void UserMouseInPut ( )
{
//GlobalCamera
//int the values to the current camera values
float cx = dbCameraPositionX ( 1 );
float cy = dbCameraPositionY ( 1 );
float cz = dbCameraPositionZ ( 1 );
//store the old values
float OldCamAngleY = dbCameraAngleY ( 1 );
float OldCamAngleX = dbCameraAngleX ( 1 );
//calculate the values
CameraAngleY = dbWrapValue ( ( dbCameraAngleY ( 1 ) + dbMouseMoveX ( ) * MouseSpeed ) );
CameraAngleX = dbWrapValue ( ( dbCameraAngleX ( 1 ) + dbMouseMoveY ( ) * MouseSpeed ) );
//set the max view
if (CameraAngleX > 90 && CameraAngleX < 180) {CameraAngleX = 90;}
if (CameraAngleX < 300 && CameraAngleX > 180 ) {CameraAngleX = 300;}
//rotate the camera
dbYRotateCamera ( 1 , dbCurveAngle ( CameraAngleY , OldCamAngleY , 6 ) );
dbXRotateCamera ( 1 , dbCurveAngle ( CameraAngleX , OldCamAngleX , 6 ) );
//set the camera
dbPositionMouse ( dbScreenWidth()/2 , dbScreenHeight()/2 );
}
this code from the last code box is what limits its looking up and down.
//set the max view
if (CameraAngleX > 90 && CameraAngleX < 180) {CameraAngleX = 90;}
if (CameraAngleX < 300 && CameraAngleX > 180 ) {CameraAngleX = 300;}
Problem Solution That Never Fails: "Build A Bridge And Get Over It"