I am VERY new to this and worked through the tutorial in the documentation to make the dodge the creeps game. I then thought I would play around for a bit and try to add features to the game. I may have bitten off more than I can chew as I decided to try and add the ability to shoot at the creeps and remove them from the game.

Problem is that I can't seem to get the collision detection to work for the bullet. I made a RigidBody2D called bullet in a new scene and gave it an icon and a collision shape etc. I managed to get it to shoot from my character but it just bounces of the creeps and nothing happens. My attempted implementation is as follows:

  1. Bullet rigid body is instanced in the main script when the player shoots
  2. The on body entered signal from the bullet is connected back to the main script (Contact monitor is on with max contacts 1 and I tried increasing max contacts to no avail)
  3. the main script calls body.queue_free() to remove the body the bullet collided with

Clearly I am misunderstanding something but I cannot work out what. I have attached the whole project in case the error lies elsewhere. Any help is appreciated 🙂

dodge-the-creeps.zip
7MB