i bet this is your problem
dbPositionMouse (dbScreenWidth() /2, dbScreenHeight() /2);
when your clicking the mouse its moves its position so in turn the camera jolts.
i use this code for mouse/camera control. also controls the player
float fCameraAngle = 0.0f;
float fCameraZoom = 0.0f;
float fCameraHeight = 70.0f;
while ( LoopGDK () )
{
float fHeight = dbGetTerrainGroundHeight( 1, dbObjectPositionX(3), dbObjectPositionZ(3) );
fCameraAngle = dbWrapValue ( fCameraAngle + dbMouseMoveX ( ) * 0.4f );
fCameraZoom = ( fCameraZoom + dbMouseMoveZ ( ) * 0.2f );
if (fCameraZoom < 100) fCameraZoom = 100;
if (fCameraZoom > 1000) fCameraZoom = 1000;
if (dbMouseClick ( ) == 4) fCameraHeight = ( fCameraHeight + dbMouseMoveY ( ) * 0.4f );
dbPositionObject ( 3 ,dbObjectPositionX ( 3 ), fHeight+50, dbObjectPositionZ ( 3 ) );
if ( dbMouseClick ( ) == 3) //RUN
{
dbYRotateObject ( 3, fCameraAngle);
dbMoveObject ( 3, 4.2f );
}
if ( dbMouseClick ( ) == 1) //Walk
{
dbYRotateObject ( 3, fCameraAngle);
dbMoveObject ( 3, 1.4f );
}
if ( dbSpaceKey ( ) == 2) //Attack
{
//do something
}
if ( !dbMouseClick ( ) )//Idle
{
//do something
}
dbSetCameraToFollow ( dbObjectPositionX ( 3 ), dbObjectPositionY ( 3 ), dbObjectPositionZ ( 3 ), fCameraAngle, fCameraZoom, fCameraHeight, 10, 0);
dbPointCamera ( dbObjectPositionX ( 3 ), dbObjectPositionY ( 3 )+50, dbObjectPositionZ ( 3 ) );
dbSync ( );
}