ramrumram Posted December 26, 2018 Share Posted December 26, 2018 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. Quote function update() { if (jKey.isDown) { player.animations.play("thrust"); game.physics.arcade.collide(player, trees, function(player, tree) { console.log('works'); }); } } Link to comment Share on other sites More sharing options...
Recommended Posts