Closed ttencate closed 7 years ago
Many thanks for submitting a demo, this makes it much easier to debug.
This bug has been resolved already. I ran your demo in a fresh build and it didn't have the bug. Did you rebuild p2.js
and p2.min.js
? (run npm install
and grunt
in the repo)
Yep, that helps :) Thank you!
Under what circumstances does this manifest? I'm asking because I just used the plane for testing; in the real game it will probably be a HeightField, and I would prefer to keep using an official, stable release rather than a random Git head :)
It's only the specific case when you use a Plane shape at a right angle. It made the bounding box computation fail. This is the fix: https://github.com/schteppe/p2.js/commit/c6b447af740557b6bd004db877f23a9b94edb4cf
The master branch has some nice optimizations in it, you may wanna try it. I'd appreciate if you tested it, so I could get the new release out faster :)
Thanks, OK, I'll check it out. Literally ;)
When I have a plane that's not at the origin, we get free energy from nothing! Observe: https://ttencate.github.io/p2.js/demos/plane.html
This happens on the current
master
branch as well as in release 0.7.1.As a workaround, the plane can be assigned a tiny nonzero
angle
.