by Tade0 · 2w ago · 0 comments
I've been working on a golf game to play with my friends and the first hurdle I had to go through was the fact that you can't just slap an off-the-shelf physics engine on it and call it a day, because over certain velocities the ball will tunnel through the walls.
[0] https://github.com/vpinball/vpinball/blob/master/docs/Change...
The main issue was "bouncy ball" physics. At certain angles, balls should roll along the edge and continue to touch that edge. In other cases, the ball bounces of the edge. It's very hard to get both use-cases right. Anyway, you cannot seem to get it right without taking the ball spin into account.
Some things seems very simple but are actually very hard. Pinball physics is one of them. The other I know of is time, super complex!