Car Collisions

BlitzPlus Forums/BlitzPlus Programming/Car Collisions

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hello again,

I'm currently coding a 2D racing game, and I need to come up with a simplistic and yet realistic algorithm which determines the movement of a car after colliding with a wall or another car.

The algorithm needs to take the following into account:

1: The car(s) angle(s) - This determines the resultant angle(s)
2: The point of contact - This also determines the resultant angle(s)
3: The car(s) speed(s) - This determines the resultant speed(s)

Any suggestions for such an algorithm (preferably in psuedocode) would be most appreciated!

Thanks,
Ryan