debug drawer not appearing

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
JohnBoyMan
Posts: 14
Joined: Tue Jun 28, 2011 4:11 am

debug drawer not appearing

Post by JohnBoyMan »

Hello. I have built the debug drawer for btDiscrete Dynamics world like this.

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();
	

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.
Post Reply