Hi, I am doing the Game level tutorial, and wanted to add the sidestepping ability to the camera. But I have a problem making the camera moving sideways.
while ( LoopGDK ( ) )
{
dbHideMouse();
dbPositionMouse (scW/2, scH/2);
dbShowSprite ( 34 );
dbControlCameraUsingArrowKeys(0, 5.0, 0.3);
key = dbMouseClick();
fCameraAngleX = dbWrapValue(fCameraAngleX + dbMouseMoveY() * 0.4f);
fCameraAngleY = dbWrapValue(fCameraAngleY + dbMouseMoveX() * 0.4f);
dbXRotateCamera(fCameraAngleX);
dbYRotateCamera(fCameraAngleY);
switch(key)
{
case 1:
dbMoveCamera (0, 5.0);
//dbPositionCamera ( 0, camPos + 5, camPos + 5, camPos + 5 );
//case 2:
// dbSetVector3ToCameraPosition ( 33, 0 );
// dbPositionCamera ( 0, 33 );
default:
break;
}
// update the screen
dbSync ( );
}