EDIT: 5-19-08: Removed IMG tags on first post so it's easier to view this page
I'm making an FPS game in Dark GDK, in an attempt to transition from Dark Basic Pro to C++, but I am having a funny issue. I got the camera positioned how I wanted it in relation to the gun so I was going to use the dbLockObjectOn() code, but when I did that, the gun disappeared. Here's my working code:
#include <DarkGDK.h>
void DarkGDK(void)
{
dbSetDisplayMode(1024,768,32);
dbSyncOn();
dbSyncRate(0);
dbLoadObject("media/models/stoner.x",1);
dbLoadImage("media/textures/stoner.jpg",1);
dbTextureObject(1,1);
dbPositionObject(1,25,0,-150);
while (LoopGDK())
{
dbSync();
}
return;
}
and a screenshot of the working code
http://zaibatsugames.com/fpsgame/nolock.JPG
Heres the code with the dbLockObjectOn() command
#include <DarkGDK.h>
void DarkGDK(void)
{
dbSetDisplayMode(1024,768,32);
dbSyncOn();
dbSyncRate(0);
dbLoadObject("media/models/stoner.x",1);
dbLoadImage("media/textures/stoner.jpg",1);
dbTextureObject(1,1);
dbPositionObject(1,25,0,-150);
dbLockObjectOn(1);
while (LoopGDK())
{
dbSync();
}
return;
}
and the screenshot
http://zaibatsugames.com/fpsgame/lock.JPG
Any help will be greatly appreciated.