# Simple dynamic-static circle collision response

• October 9th, 2011, 11:38 PM
tukhes
Simple dynamic-static circle collision response
Hellooooo! I have spent an endless amount of time this weekend trying to figure out simple physics for a pong-ish game I'm work on in which the paddles are circles rather than lines. I am having a hard time finding a well explained way to bounce the ball of of the circular paddles realistically. Most tutorials are for dynamic-dynamic collisions and I find them hard to understand and thus manipulate it to how I need it to work. I understand conservation of energy and stuff, the problem is the angles and figuring out the x+y velocities after. If someone could give me some guidance and perhaps a code snippet / an equation I could use it would be greatly appreciated! :)

Just need a way to get the final x+y velocities after the collision with the paddle ^^ thnx ahead of time
• October 10th, 2011, 12:20 AM
helloworld922
Re: Simple dynamic-static circle collision response
Pseudo-code:
Assuming the paddle isn't moving (or at least its movement doesn't affect the solution)

1. Compute the normal at the point of contact (simple, for a circle it's the line from the center of the circle to the collision point)
2. Reflect the balls velocity around that line. See: Coordinate rotations and reflections - Wikipedia, the free encyclopedia for a 2D transform matrix that will do this for you.
• October 10th, 2011, 11:08 AM
tukhes
Re: Simple dynamic-static circle collision response
Ok well I didn't understand any of that :\$ aha I did find out however that R = 2W - P for reflecting off of an angled wall which is essentially what I'm doing. I'm however not mathematically smart enough to manipulate that to give me a vector after... HELPS :)
• October 10th, 2011, 11:54 AM
KevinWorkman
Re: Simple dynamic-static circle collision response
Why don't you just get the delta X and delta Y from the center of the circle and use those?