What is the proper way to debug draw Bullet physics in libGDX so that I may see the btCollisionObjects
that I am setting up?
So far I have the below, but it doesn't appear that the btCollisionObjects
are appearing.
public void render(float delta) {
debugDrawer.begin(cam);
collisionWorld.debugDrawWorld();
debugDrawer.end();
modelBatch.begin(cam);
...
modelBatch.end();
}
@Override
public void show() {
Bullet.init();
...
collisionConfig = new btDefaultCollisionConfiguration();
dispatcher = new btCollisionDispatcher(collisionConfig);
broadphase = new btDbvtBroadphase();
collisionWorld = new btCollisionWorld(dispatcher, broadphase, collisionConfig);
debugDrawer = new DebugDrawer();
collisionWorld.setDebugDrawer(debugDrawer);
debugDrawer.setDebugMode(btIDebugDraw.DebugDrawModes.DBG_MAX_DEBUG_DRAW_MODE);
}
DebugDrawer
is the one from the tests? And it does implement some of the callbacks?