Hi,
I found some snippets on the web but nothing directly related to CC2D-x HTML5.
My physics world works properly, with bodies, gravity, etc. However, I’d love to use the debug drawing capabilities, so I put the following code as I initialize the b2D world:
`this.world = new b2World(new b2Vec2(0, -10), true);
this.world.SetContinuousPhysics(true);
var m_debugDraw = new Box2D.Dynamics.b2DebugDraw(PTM_RATIO);
m_debugDraw.SetSprite(document.getElementById(“gameCanvas”).getContext(“2d”));
m_debugDraw.SetDrawScale(1.0);
m_debugDraw.SetFillAlpha(0.3);
m_debugDraw.SetLineThickness(1.0);
m_debugDraw.SetFlags(b2DebugDraw.e_shapeBit | b2DebugDraw.e_jointBit);
this.world.SetDebugDraw(m_debugDraw);`
I suppose I’m eithr missing something or doing it plain wrong
Any clues welcome!
thanks,
J.