Hole project, when to remove objects from scene?

Godot Version

4.7.2

Question

After successful solution to collision by @normalized, I’m facing another unknown solution to problem.

When to call for removing the “falling” object from scene?

In first basic levels are only balls, with diameter 0.4m, so Collector(Area3D) could be placed with collider below surface 0.8m and safely remove them.

But what about different shapes such as Prism, Cone, etc. which could be falling a different directions or might have not typical lengths ?

Should I make for each type of object different Collector(Area3D) to only detect body_enter signal at certain height, or there is some different solution to this problem?

For typically falling down house this would be 6m and be removed right?

What about block of road?

How to make sure to player gets points and object is removed after complete disappear from scene? ( if I get player points before is certain the object falls it might glitch it.

Instead of removing the object when it enters the hole, I would Place an area at ground Level and remove (and score) any objects that exit it with downward velocity. This way, the height basically doesn’t matter

Interesting approach, what sizes would you use , I mean thickness?

Assuming that object’s position roughly coincides with its collider center, you can just check if the position is below some vertical coordinate (which is slightly below ground). If that’s the case the object is pretty much guaranteed to fall down the hole. Check only for objects that entered the vicinity of the hole, of course.

Alternatively, if you want to avoid manual checking in script, put a tiny area at the center of each object and detect its entrance by some area down in the hole.

Would be ok to use Area3D ?

current code attached to Area3D which is responsible of detecting bodies falling below ground.

would I need to get from this script ( GameSystem_Level1) parent of this Area3D and check and remove based on it? - or need to transfer logic to objects itself to emit signals?

func _on_collector_body_entered(body: Node3D) -> void:
	if body.is_in_group("ball"):
		balls_to_collect -= 1
		counter.text = "Left to collect: " +str(balls_to_collect)
		if balls_to_collect <= 0 and not game_won:
			game_won = true
			win_game()
			level_1.stop_level()
			await get_tree().create_timer(3.0).timeout
			get_tree().call_deferred("change_scene_to_file", "uid://c030bssualgeh")
			
	if body.is_in_group("fallable"):
		score += body.value_of_object
		xp_bar_calc()
		check_score()
		body.queue_free()


func _on_collector_area_entered(area: Area3D) -> void:
	pass # Replace with function body.

Scene Tree of Level - Gamesystem have basic script plus for each level extend.

You could use a WorldBoundary shape facing downards near the floor, anything touching above the line is not fully consumed.