You can use find_node()
, but keep in mind this is a potentially fragile method that is slower than get_node()
. In particular, avoid using it every frame – cache its result into a variable in _ready()
instead (or use onready
).
It's likely a better idea to keep using get_node
or its $
shorthand ($"../Player"
), but cache the result into a variable at the top of your script using onready var player = $"../Player"
.