I have just done an example which will be included in the next update, here is the code, sorry it's in C++ as this is how I do all testing before I implement the DBPro version.
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbAutoCamOff();
dbPositionCamera(0, 0, -100);
dbPointCamera(0, 0, 0);
dbMakeObjectBox(1, 100, 100, 0.5);
dbPositionObject(1, 0, 0, -50);
dbMakeObjectBox(2, 100, 100, 0.5);
dbPositionObject(2, 0, 0, 50);
dbMakeObjectBox(3, 0, 100, 100);
dbPositionObject(3, 50, 0, 0);
dbMakeObjectBox(4, 0, 100, 100);
dbPositionObject(4, -50, 0, 0);
dbMakeObjectBox(5, 100, 0.5, 100);
dbPositionObject(5, 0, 50, 0);
dbMakeObjectBox(6, 100, 0.5, 100);
dbPositionObject(6, 0, -50, 0);
dbGhostObjectOn(1);
dbGhostObjectOn(2);
dbGhostObjectOn(3);
dbGhostObjectOn(4);
dbGhostObjectOn(5);
dbGhostObjectOn(6);
if(!dynStart())
return;
dynSetParameter(NX_VISUALIZATION_SCALE, 1.0);
dynSetParameter(NX_VISUALIZE_COLLISION_SHAPES, 1.0);
dynSetParameter(NX_VISUALIZE_COLLISION_SKELETONS, 1.0); //51
dynSetParameter(NX_CONTINUOUS_CD, 1.0);
dynMakeMaterial(1, 1.0, 0, 0);
dynSetScaleMultiplier(0.5);
int startID = 7;
for(int i = 0; i < 100; i++){
int ID = i + startID;
dbMakeObjectBox(ID, 1, 1, 1);
dbPositionObject(ID, dbRND(100) - 50, dbRND(100) - 50, dbRND(100) - 50);
dynMakeBox(ID, 0.1f);
dynSetMaterial(ID, 0, 1);
dynAddForce(ID, dbRND(1000) - 500, dbRND(1000) - 500, dbRND(1000) - 500);
dynMakeCCDSkeletonBox(ID, 0);
}
dynCookTriangleMesh(1, 1);
dynMakeTriangleMesh(1, 1);
dynMakeTriangleMesh(2, 1);
dynCookTriangleMesh(3, 2);
dynMakeTriangleMesh(3, 2);
dynMakeTriangleMesh(4, 2);
dynCookTriangleMesh(5, 3);
dynMakeTriangleMesh(5, 3);
dynMakeTriangleMesh(6, 3);
dynSetMaterial(1, 0, 1);
dynSetMaterial(2, 0, 1);
dynSetMaterial(3, 0, 1);
dynSetMaterial(4, 0, 1);
dynSetMaterial(5, 0, 1);
dynSetMaterial(6, 0, 1);
dynSimulate();
while ( LoopGDK ( ) )
{
dynFetchResults();
dynUpdate();
dynDebugRender();
dynSimulate();
dbControlCameraUsingArrowKeys(0, 1, 2);
dbSync ( );
}
dynFetchResults();
dynStop();
return;
}
There are a few limitations I never knew about, I will update the docs.
Static objects must be a triangle mesh or a convex mesh for it to work.
For dynamic vs dynamic there is another flag that has to be set, you will be able to do this after the update.
So for the case of bullets, your static geometry has to be a mesh(triangle or convex), your bullets can be anything you like, boxes, spheres etc.
I found it is best to use the 'dyn set scale multiplier' to less than 1.0 before you make the skeletons.
Let me know if this solves your issue.