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
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