+ 6
[Solved] I want to directions after collision of two balls?
5 Answers
+ 2
look at this code:
https://code.sololearn.com/W5qWuZcATtX4/?ref=app
the physics are in the crash() function, it also plays a note for each collision, which we did originally to keep track
+ 6
This will help you:
https://www.real-world-physics-problems.com/physics-of-billiards.html
+ 2
let me know if you need more explanations to the code, it is very crowded with functions you may not need.
coe is a coefficient of elasticity, which causes balls to slow down by 5% in each collision. Just set to 1 if you want perfectly elastic collisions (or remove from your equations)
+ 1
bell thank you so much
+ 1
Help me to learn scanner