Jump to content

Collision's between a group and phaser objetc's


Nikow
 Share

Recommended Posts

I think what you're looking for is: 

 

this.physics.arcade.collide( this.myShoots, this.asteroids);     //put this in your update function (will differ if you're using stages/states)

 

and then you'll have to define the 'myShoots' function and the "asteroids" function just bellow your update function, before your closing }; . 

 

I hope this is what you were looking for! Play around with your code. it seems like it's 10% "coding" 90% debugging haha..

 

 

lol my bad:

 

this.physics.arcade.collide( this.myShoots, this.asteroids); //this will make them collide 

 

this.physics.arcade.overlap( this.myShoots, this.asteroids, this.die, null, this); //so this says when the shot and the astroid collide execute the third parameter "die". don't forget to make the functions! 

Edited by phuurup
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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