fix: Add restitution to Ball
Description
This adds some restitution to the ball (this means that it will bounce off things) which makes the physics simulation look a bit more realistic. Currently when it hits the pads for example the ball just stops, which looks a bit unnatural.
Preferably I would like to have changed the friction of the ball not to be 0 too, but since the rendering currently depends on the direction of the ball and the 0 friction is used to ensure that the ball doesn't rotate that is a much bigger change.
Type of Change
- [ ] โจ New feature (non-breaking change which adds functionality)
- [x] ๐ ๏ธ Bug fix (non-breaking change which fixes an issue)
- [ ] โ Breaking change (fix or feature that would cause existing functionality to change)
- [x] ๐งน Code refactor
- [ ] โ Build configuration change
- [ ] ๐ Documentation
- [ ] ๐๏ธ Chore
Thanks @spydon for the PR!
Physics changes require to be playtested to see if the game is still as fun. In addition we also need to check the ball can't get stuck or looped on a game spot. I will let you know once I give it a try!
Changes LGTM, but as @alestiago we need to do a run of play test to check how this plays.
But also something to consider is that this will change how the game plays, which means that, in theory, to be fair with the new scores, that we should clear the scoreboard, as the game will plays different from when those scores were generated.
Thanks for your contribution. We've actually decided to archive this repo since we don't have anyone working on it full time these days, since it was mostly a demo for an event, but please don't hesitate to fork the repo (it's open source!) if you want to keep it alive!