Well, the way you said to fix the bug was
Quote: "SC_UpdateObject(ObjID)"
That isn't working and it is saying invalid syntax. This may make it more clear of what I want to do--
// 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 );
dbLoadImage ( "map.jpg", 1 );
dbLoadImage ( "map.jpg", 2 );
dbSetCameraRange ( 1.0f, 30000.0f );
dbSetupTerrain ( );
dbMakeObjectTerrain ( 1 );
dbSetTerrainHeightMap ( 1, "map.jpg" );
dbSetTerrainScale ( 1, 2.0f, 0.6f, 2.0f );
dbSetTerrainTexture ( 1, 1, 2 );
dbBuildTerrain ( 1 );
dbMakeLight ( 6 );
dbSetLightRange ( 6, 10 );
dbMakeObjectSphere ( 4, 10 );
dbSetObjectCollisionOn ( 2 );
dbSetObjectCollisionOn ( 1 );
dbPositionCamera (500, 11, 452 );
dbMakeCamera ( 3 );
dbSetCameraView ( 3, 0, 0, 100, 100 );
// our main loop
while ( LoopGDK ( ) )
{
dbControlCameraUsingArrowKeys ( 0, 1.5f, 2.0f );
dbPositionCamera ( 3, dbCameraPositionX ( 0 ), 350.0f, dbCameraPositionZ ( 0 ) );
dbRotateCamera ( 3, 90.0f, dbCameraAngleY ( 0 ), 0.0f );
dbPositionObject ( 4, dbCameraPositionX ( 0 ), dbCameraPositionY ( 0 ), dbCameraPositionZ ( 0 ) );
dbPositionLight ( 6, dbCameraPositionX ( 0 ), dbCameraPositionY ( 0 ), dbCameraPositionZ ( 0 ) );
dbUpdateTerrain ( );
// update the screen
dbSync ( );
}
// return back to windows
return;
}
That is my code, and what I want it to do is that when the object hits something, it stops. Also, is it posible to do this with terrain? SO that the object collides with the terrain? If not, it isn't a huge problem....