Jump to content

IsoSprite collision problems


Boneclaw
 Share

Recommended Posts

Hello, I'm new in Phaser world, and i've got some issues with kill(); and the code didn't work properly.

I have 2 objects : player and enemy in the same group, and i use :

 game.physics.isoArcade.collide(group1);  game.physics.isoArcade.overlap(player, enemy ,function(player, enemy) {	      		player.kill();	      });

to destroy the player when enemy collide with him. The code it work only when the 2 entities are face to face. I'm sure that i missed a lot of things, but i need some help. I'm stuck !

 

I want to mention if i have a simple sprite instead of isometric sprite, the code works fine:

game.physics.isoArcade.overlap(item, player, function(x) {	        	x.destroy();	        	addItem();	        });

How can i make to destroy 1 isoemtric entity when both of them are collide, but when they are not  just face to face ? Thank you in advance, and sorry for my bad English ! :D

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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