![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | JorensM |
This is my code, for both nodes(Spike and Flamethrower), it is exactly the same:
func _process(delta):
var colBodies = get_overlapping_bodies()
for i in range(0, colBodies.size()):
if("type" in colBodies[i]):
if(colBodies[i].type == "Player" && is_active):
print("DID COLLIDE")
colBodies[i].dealDamage(damage, position)
The is active variable returns true, and the same exact code works for the Spike node, but doesn’t work for the Flamethrower
Console doesn’t print “DID COLLIDE”