I downloaded quickode today to use for physics. I wanted to ask if there is any tutorial available for it, and also I was wondering if anyone can help me get Intellisense to parse the library? It would make it alot easier to get it working if I had the function prototypes pop up when I started typing!!! Thanks ahead of time.
Edit: I got some of the basics figured out, but my gravity keeps making me endlessly float upward. I am trying to use an FPSC level:
#define GROUND_OBJECT 10
#define PLAYER_OBJECT 11
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
#include "QuickODE.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
// in this application we are going to create some 3D objects
// and position them on screen
// when starting a Dark GDK program it is useful to set global
// application properties, we begin by turning the sync rate on,
// this means we control when the screen is updated, we also set
// the maximum rate to 60 which means the maximum frame rate will
// be set at 60 frames per second
dbSyncOn ( );
dbSyncRate ( 60 );
// set our random seed to a value from the timer, this will help
// to ensure each time we run our program the random values appear
// more random
dbRandomize ( dbTimer ( ) );
qoBase *physics = new qoBase();
physics->Init();
// here I have tried both 9.8f and -9.8f and they both make me float up
physics->SetGravity (0, 9.8f, 0);
// make a ground object to stand on
dbLoadObject ("universe.dbo", GROUND_OBJECT);
dbPositionObject (GROUND_OBJECT, 0, 0, 0);
// make a player object (test)
dbMakeObjectBox (PLAYER_OBJECT, 20, 40, 30);
dbPositionObject (PLAYER_OBJECT, 600, 300, -300);
dbHideObject (PLAYER_OBJECT);
// setup the ground as a static box
physics->CreateStaticBox (GROUND_OBJECT);
// setup the player object as a body
qoBody *player = physics->CreateBodyBox (PLAYER_OBJECT);
// move our camera back so we can view the objects
dbPositionCamera ( 50, 100, 50 );
// now we come to our main loop, we call LoopGDK so some internal
// work can be carried out by the GDK
while ( LoopGDK ( ) )
{
// print framerate
dbSetCursor (10, 10);
dbPrint ("FPS: ");
dbPrint ((float) dbScreenFPS());
// rotate on mouse movement
dbRotateCamera (dbCameraAngleX()+dbMouseMoveY (), dbCameraAngleY()+dbMouseMoveX(), dbCameraAngleZ ());
dbSetObjectToCameraOrientation (PLAYER_OBJECT);
// control camera
// update physics
physics->Update();
// move the camera to where the player object is
dbPositionCamera (dbObjectPositionX (PLAYER_OBJECT), dbObjectPositionY (PLAYER_OBJECT), dbObjectPositionZ (PLAYER_OBJECT));
// here we make a call to update the contents of the screen
dbSync ( );
}
physics->Cleanup();
// and now everything is ready to return back to Windows
return;
}
Any reason why I have become a balloon?