Lets say I want to use Box2D javascript to simply print the coordinates of a falling object, into a text box, and not simulate the scene using debugDraw.
Or,
Lets say I want to use Box2D javascript to simulate it to a canvas using WebGL or some other library, and not simulate the scene using debugDraw.
I looked at many tutorials (including Seth’s) and they all show us how to simulate the physics using debugDraw.
Is there some way where I can get access to each body’s positional coordinates, angles, velocities, etc. ? Maybe all those parameters that will enable me to create a simulation of my own and not from debugDraw.
Thanks!
Okay, after some research I found that the documentation here contains methods and members such as
m_position,GetAngle(),GetBodyList()which return information about the parameters of a body, with which it can rendered using a graphics library like WebGL.