Hi, I'm making a zeldalike where you can walk around, get hit by enemies, and hit them back with a sword. I have an enemy (a bee) that has a sight box, a circle around it so it can detect the player and start moving towards him.
The issue is that this sight box "hits" the player, causing him to take damage.
The sight box has no layer, and its mask it set to only see the player. The player's hurtbox is set on the player layer, and its mask is set to only see enemies.
My understanding is that this setup would cause the hurtbox to never register the sight box, because the sight box has no layer. But of course, the sight box would see the player, because its mask is set to look for the player.
Can anyone tell me what I'm doing wrong, or how I'm misunderstanding the system? It seems like what's happening is that if a collision is registered in one direction (i.e. the sightbox registering the player) somehow that necessitates the collision registering in the other direction (the hurtbox registering the sight box)? Is that what's happening? And if so, that seems counterintuitive to say the least. How should I get past this?
Thanks very much.