so my ball is passing through my paddle despite the collision code I implemented.
//bounce off paddle and bricks
GObject collision = detectCollision(window, ball);
if (collision != NULL)
{
if (collision == paddle)
velocity_y = -velocity_y;
if (strcmp(getType(collision), "GRect") == 0)
velocity_y = -velocity_y;
}
Any ideas would be much appreciated. I am returning the paddle in my code below main.
Thanks!