system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Godot_Starter |
I have a Area2d, and I want to call a function in the script of the parent of the node, who enters the Area2d (body_entered).
How can I do that?
system
2
|
|
|
|
Reply From: |
Zylann |
Use get_parent()
Node — Godot Engine (stable) documentation in English
# Assuming you connected the `body_entered` signal to this function
func _on_body_entered(body):
body.get_parent().the_function()