- #1
blarp
- 5
- 0
Hello all, I am making a physics mini game and I would like your help on calculating new velocities after ball collisions. I want the balls to bounce realistically off each other (3 dimensions by the way).
So once I detect a ball collision, these are the variables I have to work with
their x, y, and z velocities
their mass
I could probably calculate a unit vector which points from one ball to the other ball at collision. (Or i could get the 2 angles, yaw and pitch angles, but I think it would be best to keep this in vectors? i don't know)
their positions
their radius
And that's it I think, well, any ideas? I know u have to use the law of conservation of momentum but I am clueless on how to start.
So once I detect a ball collision, these are the variables I have to work with
their x, y, and z velocities
their mass
I could probably calculate a unit vector which points from one ball to the other ball at collision. (Or i could get the 2 angles, yaw and pitch angles, but I think it would be best to keep this in vectors? i don't know)
their positions
their radius
And that's it I think, well, any ideas? I know u have to use the law of conservation of momentum but I am clueless on how to start.