Jump to content

sword hitting a group


Recommended Posts

I am new to phaser, I have added an animation with a 'j' key to swing sword , but I need to catch the collision with the 'tree' group when I hit 'J'

I am trying this with phaser 2 but not sure where should I put the arcade.collide..


Any help is appreciated.



function update() {
    if (jKey.isDown) {

              game.physics.arcade.collide(player, trees,  function(player, tree) {




Screen Shot 2018-12-26 at 1.31.26 PM.png

Link to comment
Share on other sites


  • Recently Browsing   0 members

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