Collision of Two Rect

Alex Gardner agardner210 at gmail.com
Fri May 3 18:23:35 EDT 2013


When rect A collides with rect B they stick when I am wanting A to bounce off of B.  I have tried different methods, but none seem to work.  My source is here:  http://pastebin.com/CBYPcubL

The collision code itself is below:
------
# Bounce off of the paddle
if paddle_rect.colliderect(ball_rect):
    y_vel*=-1
    x_vel*=-1



More information about the Python-list mailing list