Hi,
first, thanks for this neat physics library
I'm currently writing a Pong-like game. In order to simulate the ball's movement I use Phys2D.
There are certain behaviours of Phys2D that look like potential bugs to me:
1) The ball's angle of reflection sometimes is the opposite of what it should be.
2) The ball passes through objects if it is too fast.
3) Not all collisions are being reported.
A few more details:
There's no gravity, dampening or friction. The ball is a dynamic body whereas the rest is static (including the paddles). Restitution is 1. The ball's movement is only controlled by the world (except when it is reset after somebody scored).
1) If the ball hits the corners of a paddle, it sometimes gets reflected at an impossible angle. If the two frontal corners get hit, the ball usually takes off at the opposite angle it is supposed to travel. For example if it comes flying at the paddle from above and hits the lower frontal corner. It will then be reflected at the same angle it arrived, which shouldn't happen.
If the ball hits the upper or lower back corner, it behaves as if it had hit the straight back side of the paddle. Just as if it is ignoring the angled side of the paddle's polygon.
2) If the ball is too fast (faster than in the above version) it passes through objects, e.g. even if you hit a paddle in its center, the ball reports its position as off screen. This is connected to the second part of 1) I guess. Even at lower speeds, it can pass through sides of the polygon and reflect off the back.
3) Sometimes the world does not report collisions for the ball. After every world.step() I check contacts of the ball with world.getContacts(ball). In some occasions this does not report any collisions even if the ball just bounced off a wall. You can see this happen if the ball hits something and no sound plays. This is not due to a bug in my audio player, as in a newer version, I also display particle effects which do not appear when the collision is missed.
I've tried adjusting world parameters as far as iterations and step length are concerned but it didn't seem to help.
Are these bug or did I just use Phys2D wrong? I know it's hard to tell without looking at the code but maybe it sounds familiar
