Open manideepabc opened 10 years ago
var x1 = edge.get_m_vertex1().get_x(),
y1 = edge.get_m_vertex1().get_y(),
x2 = edge.get_m_vertex2().get_x(),
y2 = edge.get_m_vertex2().get_y();
by the way, does any know how to access an array from box2d.js
fox example world.GetBodyList()
or chainLoopShape.get_m_vertices()
only return one object from the array
@aptxyz GetBodyList()
returns a Body object that has a GetNext()
function that returns the "next" body in the World. This keeps going until GetNext()
returns a body with the a
property equal to 0, which represents the end of the list.
I want to draw bodies by other rendering methods instead of debug draw. so,to draw an edge shape we have to know the vertices comprising the edgeshape.
can someone let me know how to know these vertices.