I’m trying to get a simple physics game working that uses a ball. The ball needs to bounce off walls realistically. However, when the ball approaches any wall at a relatively small angle, it just sticks to the wall instead of bouncing off.
Is there any possible way around this? When going head on at the wall, the ball will bounce. It will also bounce all the way up until around 20 degrees or so, depending on the velocity.
I wanted to clarify this question a bit more. Here is a quick drawing of the problem:
I need the case on the right to not happen anymore. If I had to guess, I’d say that the collision logic has a bug in it where it tells objects to not have any velocity other than parallel to the normal if it’s going slow enough.