Bouncing Squares
Author |
Message |
jondmml
|
Posted: Thu Mar 29, 2007 8:36 pm Post subject: Bouncing Squares |
|
|
I have a couple squares moving around on the screen. These squares may have different x and y velocities at any time. I was wondering how to make them "bounce" off each other realistically. I have the collision code figured out but do not know how to properly alter the velocities. I have read through the forums and have found multiple posts on bouncing circles and was wondering whether using squares would be easier to accomplish and if so, how to begin.
Thanks,
Jon |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Drakain Zeil
|
Posted: Fri Mar 30, 2007 7:26 am Post subject: RE:Bouncing Squares |
|
|
Swap velocities between objects, don't modify them.
If you gave an example of your code it would be easier to help you. |
|
|
|
|
|
|
|