March 30th, 2009, 08:24 AM
C++ Collision Detection Physics
I have a game of bat and ball, the bat is made out of 2 rows of 8 points of which are connected into a coloured face, what I am having problems with is programming the physics so that the ball will bounce away from the bat when it collides.
I know I need a algorithm to calculate whether the bat will be infront of the ball by the time the ball arrives at the location and another algorithm to tell the ball which direction to bounce off in.
I understand the theory but not what code I need to do this
Any ideas or code would be greatly appreciated
Tags for this Thread
Click Here to Expand Forum to Full Width