void Bullet::beginContact(QFixture *other, b2Contact *) { if (other->isSensor()) return; destroyLater(); ParticleSystem *p = static_cast<World *>(world())->particleSystem(); p->addExplosion(worldCenter(), 5, 0.1, 20); if (QChain *chain = dynamic_cast<QChain *>(other->body())) { chain->cutCircle(Circle(Vector2d(worldCenter()), 5)); } }