I finally got around to testing this problem. First I tried the suggested code with dbPitchCameraUp and dbTurnCameraRight. There were two problems with it. (1) When you press the mouse button for the first time, if you moved the mouse before clicking, then the first reading of dbMouseMoveX/Y will be so large that the camera jumps away and your objects will be out of sight. (2) While moving the mouse around, the camera not only turns but also starts to roll around the Z axis. I'm puzzled why this is happening, but it has an undesirable effect.
To eliminate both these problems, I tried the following code and it seems to work properly:
bool MouseDown = false;
// our main loop
while ( LoopGDK ( ) )
{
if (dbMouseClick()==1)
{
if (MouseDown) {
dbRotateCamera(dbCameraAngleX() + dbMouseMoveY(), dbCameraAngleY() + dbMouseMoveX(), dbCameraAngleZ());
} else {
dbMouseMoveX();
dbMouseMoveY();
MouseDown = true;
}
} else {
MouseDown = false;
}
dbSync ( );
}
The MouseDown flag indicates when the mouse button is pressed first, and the first mouse movement reading is discarded, so problem (1) is solved. For problem (2), I would use the dbRotateCamera instead of the right and up functions, to be able to constrain the rotation to only two axes.
Try if this works for you.