-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken P2 physics (world) bounds since Phaser 2.7.0 #493
Comments
See also #409 |
p2.setBounds sets p2.walls.left.angle to 1.5707963267948966. Setting this to a different number--even just changing the least significant digit--seems to fix collisions. (Make sure you actually change it though. On my machine if I try to set it to ...965 javascript actually sets it back to ...966.) Could be some sort of rounding error in P2JS's collisions. Maybe @schteppe has some insight? |
I haven’t debugged this, but my guess is that it’s about a p2.Plane shape. There’s optimized code paths for vertical/horizontal planes, and they had bugs in them at one point... what version of p2 is this? |
This Issue is about
There seems to be an issue with world bounds or to be more precise a combination of world bounds and P2 physics bounds that has been introduced in Phaser 2.7.0 and is still there in 2.10.1.
Setting up a world with world bounds slightly bigger than P2 physics bounds has the effect that top, right and bottom bounds work as expected but left is broken.
Same code is working fine in Phaser 2.6.2.
Working (2.6.2): https://codepen.io/anon/pen/GxgVQp
Broken (2.7.0): https://codepen.io/anon/pen/bvNXmW
The text was updated successfully, but these errors were encountered: