html5 - Box2D collision causes huge FPS drop -
i'm playing box2dweb , html5 canvas, , experiencing odd behaviour. have 1 dynamic body , 1 static body, in world. can control dynamic 1 keyboard.
but these 2 collide, dip 60 fps 17, , cannot move dynamic body more (due lag, bearly moves).
i have try profiling using firebug, , can see result here: http://i.imgur.com/sne6oxg.png
as can see, it's box2d taking time here; own rendering/clearing/processing functions aren't listed until 0.1% in table.
if want sample-code, tell me! have found other people same problem here , here, didn't answer. i'm giving try!
i found problem! related ppm (pixels per meter).
it turns out setting pretty low (32), , when increased 192, runs smoothly again! thank god. hope can other people!
Comments
Post a Comment