debug drawer not appearing
Posted: Wed Oct 26, 2011 5:20 am
Hello. I have built the debug drawer for btDiscrete Dynamics world like this.
I read this in the manual "Derive your own class and implement the virtual ‘drawLine’ and other methods."
what does that mean? I don't know how to do that.Is there a simple way to do it for bullet normal shapes.
It will no draw anything but does not error so im cose. Can someone help thanks.
Code: Select all
collisionConfiguration = new btDefaultCollisionConfiguration();
///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
dispatcher = new btCollisionDispatcher(collisionConfiguration);
///btDbvtBroadphase is a good general purpose broadphase. You can also try out btAxis3Sweep.
overlappingPairCache = new btDbvtBroadphase();
///the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded)
solver = new btSequentialImpulseConstraintSolver;
dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,overlappingPairCache,solver,collisionConfiguration);
dynamicsWorld->setGravity(Gravity);
debugDrawer = new DebugDrawer;
dynamicsWorld->setDebugDrawer(debugDrawer);
dynamicsWorld->getDebugDrawer()->setDebugMode(btIDebugDraw::DBG_DrawWireframe);
//dynamicsWorld->setDebugDrawer(&debugDrawer);
dynamicsWorld->debugDrawWorld();
what does that mean? I don't know how to do that.Is there a simple way to do it for bullet normal shapes.
It will no draw anything but does not error so im cose. Can someone help thanks.