
-----------------------------------
TheCatsMeow
Thu Jan 13, 2011 2:10 pm

Colision problem
-----------------------------------
What is it you are trying to achieve?
What i want to happen is make my ball bounce of of a paddle.

What is the problem you are having?
What's going wrong is.. my ball will sometimes go through the paddle and will shake, go down and then go back up and shoot off. sometimes it will deflect even if the paddle isn't there.


Describe what you have tried to solve this problem
i've look through my code, and tried changing it a litte.. (Mainly i just changed the checking part of the code)


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)


    loop

        Draw.FillOval (ballx, bally, 7, 7, yellow)      %This draws the first ball
        delay (5)
        Draw.FillOval (ballx, bally, 7, 7, black)       %This draws the second ball behind it to make it look like a solid ball
        ballx := ballx + changex * dirx             %The directions for the ball.
        bally := bally + changey * diry
            if (ballx > maxx - 10) or (ballx = maxy - 311) or (bally = lpaddley) and (bally 