I want these guys(from the dark matter models pack that comes with the GDK) to animate, they work fine in the directX viewer, but not in my game. Heres my code:
#include "DarkGDK.h"
void DarkGDK(void)
{
dbSyncOn();
dbSyncRate(60);
dbSetDir("media");
dbLoadObject("ak47\H-AK47-Static.x", 1);
dbScaleObject(1, 2000, 2000, 2000);
dbLoadObject("Alien Hivebrain\H-Alien Hivebrain-Static.x", 2);
dbAppendObject("Alien Hivebrain\H-Alien Hivebrain-Idle.x", 1, 1);
dbLoadObject("Alien Mutant\H-Alien Mutant-Static.x", 3);
dbAppendObject("Alien Mutant\H-Alien Mutant-Idle.x", 2, 1);
dbPositionObject(3, 2, 0, 4);
dbLoadObject("Alien Psionic\H-Alien Psionic-Static.x", 4);
dbAppendObject("Alien Psionic\H-Alien Psionic-Idle.x", 3, 1);
dbPositionObject(4, -2, 0, 4);
dbLockObjectOn(1);
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
while(LoopGDK())
{
dbPositionObject(1, dbCameraPositionX(), dbCameraPositionY(), dbCameraPositionZ());
fCameraAngleX = dbWrapValue((fCameraAngleX + dbMouseMoveY()));
fCameraAngleY = dbWrapValue((fCameraAngleY + dbMouseMoveX()));
dbXRotateCamera(fCameraAngleX);
dbYRotateCamera(fCameraAngleY);
if(dbUpKey())
dbMoveCamera(0, 0.2);
if(dbDownKey())
dbMoveCamera(0, -0.2);
if(dbLeftKey())
dbMoveCameraLeft(0, 0.2);
if(dbRightKey())
dbMoveCameraRight(0, 0.2);
dbLoopObject(1);
dbLoopObject(2);
dbLoopObject(3);
dbSync ();
}
return;
}
any help would be appreciated