Overlap not working on enemies from a specific spawn but working for all other enemies

My game is similar to fruit ninja, right now I am testing with fruits (the enemy) being spawned from the left / right. When the fruit hits the player they are supposed to die, this works for any fruit spawned from the left side but not the right side. What confuses me, even more is that I created a hitbox and check if they overlap to simulate it being slashed. Fruits from both sides work for this, so I don’t think it is an issue with the fruits group itself. All relevant code is below, thank you for any help.

q1 q2 q3

Hi @sachuu , this looks like Phaser 2 code and this is a Phaser 3 group, try asking in the other forum, you might get luckier there https://phaser.discourse.group/c/phaser2 :slight_smile:

I’ll try posting there, are any of the functions / methods outdated in Phaser 3? I downloaded 3 but I’ve been looking at some older tutorials to come up with the code

Phaser 3 has a totally different API and a lot of new stuff. Also the internal architecture of the engine is very different than Phaser 2.

For most concept you will find an equivalent, but Phaser 2 code won’t work with Phaser 3.

1 Like

Changed the else in my fruit spawner to else if and it works now, must of been a mistake in the logic not the code