Re: Collision of Two Rect

2013-05-06 Thread Ian Kelly
On May 6, 2013 10:39 AM, "Joshua Landau" wrote: > > On 4 May 2013 00:42, Ian Kelly wrote: >> >> The other thing that is suspicious about the code you posted is that >> it has two different notions of the ball's position that are not >> necessarily in agreement. There is the ball_rect, and there

Re: Collision of Two Rect

2013-05-06 Thread Joshua Landau
On 4 May 2013 00:42, Ian Kelly wrote: > The other thing that is suspicious about the code you posted is that > it has two different notions of the ball's position that are not > necessarily in agreement. There is the ball_rect, and there are also > the x and y variables. > You should be caref

Re: Collision of Two Rect

2013-05-04 Thread Tim Roberts
Alex Gardner wrote: > >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 pa

Re: Collision of Two Rect

2013-05-03 Thread MRAB
On 03/05/2013 23:23, Alex Gardner wrote: 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

Re: Collision of Two Rect

2013-05-03 Thread Ian Kelly
On Fri, May 3, 2013 at 4:23 PM, Alex Gardner wrote: > 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: > --

Collision of Two Rect

2013-05-03 Thread Alex Gardner
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