I have written this code but cant for the life of me work out how to move the dam camera. All it shows is a box (which i can move) in front of the camera (which wont move even with camera position). Any help?
#include "DarkGDK.h"
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include "math.h"
using namespace std;
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 ); // sets the sync rate to 60
while ( LoopGDK ( ) )
{
////////////////////////////////////////////////////////////
// Any code above here we dont need to worry about too much.
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
// SET UP CODE
////////////////////////////////////////////////////////////
dbMakeObjectCube ( 1, 10 ); // make a cube
dbPositionObject ( 1, 0, 0, 0 ); // position the cube, XYZ
int iCameraQuantity = 1;
int iCamera = 1;
for (iCamera; iCamera <= iCameraQuantity; iCamera++)
{
int dbMakeCamera ( iCamera );
}
iCamera = 1;
dbSetCurrentCamera ( iCamera );
float Cam1X = 0, Cam1Y = 0, Cam1Z = 0;
dbPositionCamera ( 1, Cam1X , Cam1Y, Cam1Z );
float fDistance = 1;
while ( !dbEscapeKey ( ) ) // loop until the escape key is pressed
{
////////////////////////////////////////////////////////////
// SET UP CODE // GAME CODE
////////////////////////////////////////////////////////////
if ( !dbDownKey ( ) )
{
dbMoveCamera ( iCamera, fDistance ) ;
}
////////////////////////////////////////////////////////////
// GAME CODE
////////////////////////////////////////////////////////////
dbSync ( ); // update screen
}
////////////////////////////////////////////////////////////
// From here, the program ends.
////////////////////////////////////////////////////////////
}
}