How to get the absolute path to a node

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ranjithtv

I have a node created from script and added to the current node. I need to get the absolute path to it so that I can animate it using scripts.
How to get the absolute path to a give node?

:bust_in_silhouette: Reply From: volzhs
extends Node2D

func _ready():
	print(self.get_path())  # prints /root/Control/Node2D

get_path() is also useful with Joint2d - node_a and node_b expect path.

DavidPeterWorks | 2019-08-23 07:06