Implementing gravity in 2D game
I'm implementing Carrom game in 2D. You could think of it in terms of pool, snooker or billiard if u r not familiar with Carrom. The problem I'm facing is how to implement "pocketing" a piece.
The problem comprises of two sub-problems:
Implementing gravity: Currently I'm simply checking the distance of each piece from the pockets during Update(). If this distance is less than the radius of the piece, that piece gets collected. Although it works, it doesn't look realistic. For example, in real life, a piece at high speed would simply bounce back off the bumper instead of falling into the pocket. How can I implement this?
As the piece falls into the pocket, it should tilt around the axis before disappearing. My guess is that the tilt axis will depend upon the direction in which the piece is moving. Is there a way to find that axis and then rotate the piece around it, maybe upto 45 degrees before collecting it?
Your answer
![](https://koobas.hobune.stream/wayback/20220612131439im_/https://answers.unity.com/themes/thub/images/avi.jpg)