Games It's not Box2D but...

melonZgz

Active Member
Licensed User
Longtime User
Some time ago I made a little pool game. I still have nightmares when I remember the making of :D
In my game the balls did not have any spin, but I did the collision detection myself
ball to ball (circle to circle) is the easiest collision to solve, you just have to check if the distance is less than the diameter, and if so-> there is a collision. The problem here is if you want to be exact and find the exact collision point (in real life, in a pool game distance should never be less tan the diameter, mainly because it's a inelastic collision) If you want to be precise you have to find the exact point where the balls did collide, wich will be between 2 physic steps. You know, in one step they don't collide and in the next one there is allready a collision. In most simulations this is not necessary, but if you don't do this in a pool game, if the cue ball is going fast, the results won't be realistic
 
Top