FreshRSS

Normální zobrazení

Jsou dostupné nové články, klikněte pro obnovení stránky.
PředevčíremHlavní kanál

How detect collision between object1[i] and object2[j] then do something with them in Box2D games?

I am making a simple game with Box2D and SDL2. I have GameObjects vectors for example: 1.vector of Enemy 2.vector of Bullets… in ContactListener class i can detect collision between enemyFixture and bulletFixture. How i can detect contact between Enemy[i] with Bullet[j] and do something only with Enemy[i] or Bullet[j]?! Thank you for your helps.

❌
❌