I'm working on programming a game, and was wondering if anyone could point me in the right direction.
Let's say you have a bunch of cubes glued together, floating in space with no gravity. Then another cube comes out of nowhere and hits the grouped cubes. When they hit, they bounce off of each other and cause changes in momentum and rotation.
How would you mathematically calculate the change in velocity of the cubes, and how much they are rotating? I'm sure it would have to do something with finding the center of masses, normal vectors, and stuff like that, but I don't know the specifics.
|