Box2D debug draw not working with Cocos2D-X 3.14

How to enable debug draw of Box2D for Cocos2D-X version 3.14? I am looking for coding implementation.

1 Like

Try looking into Box2dView.cpp in tests/cpp-tests/Classes/Box2DTestBed. I was able to copy the debug draw implementation from it without any problems.

What code did you copy?
I’ve tried it but didn’t work.

Here you go: https://github.com/domp/Box2DDebugDraw

I’ve cobbled this together a few months ago. Feel free to improve it, just create a pull request.