I would try out this layer/mask combo, I selected 3 because I figure it would be out of the way, I like to keep 1 for world collision, of course you can add more things to layer 3 if they are to be hit by the bombs, like your “bkWalls” should added to layer 3, and your Players.
For the script, try this? I would have to make a lot of assumptions on your scene tree so I will use my own example scene.
extends Node3D
@onready var chain_hit_box: Area3D = $ChainHitBox
@onready var explosion_box: Area3D = $ExplosionBox
@export var bomb_timer: float = 5.0
func _ready() -> void:
chain_hit_box.add_to_group("Bomb")
await get_tree().create_timer(bomb_timer).timeout
normal_explosion()
func normal_explosion() -> void:
if is_queued_for_deletion():# overlapping hits cause recursion
return
queue_free()
for hit in explosion_box.get_overlapping_areas():
if hit.is_in_group("Bomb"):
hit.get_parent().normal_explosion()
elif hit.is_in_group("bkWalls"):
hit.queue_free()
for hit in explosion_box.get_overlapping_bodies():
if hit is CharacterBody3D:
print(hit.name, " got hit!")

