I would suggest using the "dbSetCameraToFollow( )" command, but set the smooth really high. Here is an example, might be somewhat close to what you're looking for;
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
// make a reference matrix
dbMakeMatrix( 1, 100, 100, 10, 10 );
// our main loop
while ( LoopGDK ( ) )
{
// cube
dbMakeObjectCube( 1, 1 );
// control cube
if( dbUpKey( ) )
dbPositionObject( 1, dbNewXValue( dbObjectPositionX( 1 ), dbObjectAngleY( 1 ), .4 ), 0, dbNewZValue( dbObjectPositionZ( 1 ), dbObjectAngleY( 1 ), .4 ));
if( dbDownKey( ) )
dbPositionObject( 1, dbNewXValue( dbObjectPositionX( 1 ), dbObjectAngleY( 1 ), -.4 ), 0, dbNewZValue( dbObjectPositionZ( 1 ), dbObjectAngleY( 1 ), -.4 ));
if( dbLeftKey( ) )
dbYRotateObject( 1, dbObjectAngleY( 1 ) - 5 );
if( dbRightKey( ) )
dbYRotateObject( 1, dbObjectAngleY( 1 ) + 5 );
// CAMERA CODE
dbSetCameraToFollow( dbObjectPositionX( 1 ), dbObjectPositionY( 1 ), dbObjectPositionZ( 1 ), dbObjectAngleY( 1 ), 0, 8, 100, 0 );
dbPointCamera( dbObjectPositionX( 1 ), dbObjectPositionY( 1 ), dbObjectPositionZ( 1 ) );
// update the screen
dbSync ( );
}
// return back to windows
return;
}
Cheers!
Tux is my guildmaster.