Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | LeRoiDesAbricots |
Hi, i’m french, so sorry if my english isn’t very good.
-I made my KinematicBody2D (player) in a scene and after I instantiated it in my main scene.
-I made an Area2d (object) in an other scene that I also instantiated in my main scene.
I added a signal that detect if a KinematicBody enter in:
func _on_object_body_entered(body: KinematicBody2D): if not body == null: pass
I want to get_node()
of the player to add_child()
the object, but i don’t know how to get_node()
from another scene. I know that i can use get_tree().get_root().get_node("scene_main_node/node_wanted")
, but its not working