So im making a FPS, it uses the arrow keys to move but how can i also use the mouse to point the gun.
Im pretty new to this so all helps appreciated
#include "DarkGDK.h"
// the main entry point for the application is this function
int fCameraAngleX;
int fCameraAngleY;
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbLoadObject("Atomiser.x",10);
dbLoadObject("Bezerker.x",20);
dbAutomaticCameraCollision(0,2,1);
dbMakeObjectCube(2,10);
dbPositionObject(2,50,10,100);
dbSetObjectCollisionToBoxes ( 2 );
dbPositionObject(20,100,0,100);
dbRotateObject(20,-90,180,0);
dbRotateObject(10,-90,0,0);
dbPositionObject(10,10,-15,20);
dbLockObjectOn(10);
dbSetObjectCollisionToPolygons ( 20 );
// our main loop
while ( LoopGDK ( ) )
{
dbControlCameraUsingArrowKeys (0,2.0f,2.0f);
dbMakeMatrix(4,100,100,10,10);
// update the screen
dbSync ( );
}
// exit the program
return;
}
"Lifes like a box of chocolates, you never know which one you get" Forest Gump
Unless you read the leaflet, thats why hes so "different"