Closed mfs409 closed 3 years ago
I had the same issue and used this with success. I am iterating over the bodies list though, but it might work out the same.
for(let body = world.GetBodyList(); box2D.getPointer(body) !== 0; body = body.GetNext()){
Awesome. Thanks a ton :)
I am trying to port from a different TypeScript Box2D port, but I am finding that all code of this form has infinite loops:
It seems that
f.GetNext()
never returnsundefined
,null
, orfalse
, and so the loop keeps running forever.