schteppe / p2.js

JavaScript 2D physics library
Other
2.64k stars 330 forks source link

Body position NaN when spawned inside of each other #184

Closed oli414 closed 8 years ago

oli414 commented 8 years ago

When I try to create multiple bodies (circles and/or boxes) which overlap the positions are set to NaN as soon as world.step() is called. The bodies have a mass of 5 and are dynamic.

In very rare occasions it does actually work.

The issue on stackexchange (including code sample): http://gamedev.stackexchange.com/questions/111415/p2-js-body-position-is-nan-when-spawned-inside-of-each-other?noredirect=1#comment194380_111415

oli414 commented 8 years ago

My fault. The first time world.step(dt) was called dt was zero.