#need help with a collision issue

6 messages · Page 1 of 1 (latest)

unique drum
#

what type of nodes are you using?

zenith sundial
#

I am using area2D nodes there's one on the enemy and one on the projectile. on the enemy the Layer is set to enemy and on the mask it is set to player and player projectiles. On the projectile the layer is player projectile and the mask is enemy.

#

the signal is set up to detect area_entered

#

on the projectile and its parent class which is damage component

#

func _on_area_entered(area):
if area is HitboxComponent:
match HurtBoxType:
0: #Cooldown
collsion.call_deferred("set", "disabled", true)
disableTimer.start()
1: #HitOnce
pass
2: #DisableHitBox
area.tempdisable()
new_attack(area)
if area.has_method("enemy hit"):
area.enemy_hit(1)

#

the last message is the on area entered that should be triggered which is currently not.