spawning chests in csg boxes, working on making them root of scene so they aren't cleared with the scene on exit

This commit is contained in:
derek
2025-04-04 16:30:51 -05:00
parent 6cd06193b5
commit ce08df66e6
15 changed files with 99 additions and 76 deletions

View File

@@ -26,14 +26,10 @@ func _on_body_entered(body: Node3D) -> void:
entered = true
if active and entered:
HelperFuncs.clear_spawned_objects()
var spawned_stuff = scene_holder.get_children()
for i in spawned_stuff:
i.queue_free()
func clear_spawned_objects():
for i in get_tree().current_scene:
if i.is_in_group("spawned"):
i.queue_free()
func _on_start_activation_timeout() -> void:
active = true