Jump to content

Group Collision Detection Not Working


parksie
 Share

Recommended Posts

Hi All,

 

I have just started to learn about Game development and am following a flappy bird clone tutorials

 

All works fine, apart from the collision detection between the bird and the poles. I have the below code which loops through the poles it the group and should detect collision, however nothing happens.

 

// enable collisions between the bird and each group in the pipes group
    this.pipes.forEach(function(pipeGroup) {
      this.game.physics.arcade.collide(this.bird, pipeGroup, this.deathHandler, null, this);
    }, this);
 

I have the below code which is for a single object colllision with a TileSprite

 

// Bird collides with ground
    this.game.physics.arcade.collide(this.bird, this.ground, this.deathHandler, null, this);

 

And this works fine.

 

Any suggestions?

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...