Godot Version 4.3
Hello !! So i have centralized a mechanic inside a single script which isn’t inside any area. And i add to many area body_entered event to detect when my character enter in them. The code work , but the problem is that godot can’t give me the area that get entered. What would be the best workaround for performance ? Thank you
func _ready():
var elastics = get_tree().get_nodes_in_group("Elastics")
for elasticlist in elastics:
for rope in elasticlist.get_children():
var touch_part = Area3D.new()
touch_part.connect("body_entered", Callable.create(self,"_on_body_entered"))
func _on_body_entered(body):
print("Ok but which area has been entered ???")