Here's my detection code:
void collideBullet(Bullet bullet[], int bSize, Comet comets[], int cSize)
{
for (int i = 0; i < bSize; i++)
{
if (bullet.live)
{
for (int j = 0; j < cSize; j++)
{
if (comets[j].live)
{
if (bullet.x > (comets[j].x - comets[j].boundX) &&
bullet.x < (comets[j].x + comets[j].boundX) &&
bullet.y > (comets[j].y - comets[j].boundY) &&
bullet.y < (comets[j].y + comets[j].boundY))
{
bullet.live = false;
comets[j].live = false;
}
}
}
}
}
}
Everything else works in my game, apart from the comets don't disappear. Thanks.