I'm not sure how to do this either and I had to on a recent project, but I found a workaround where I used a signal to broadcast the position of the subject (world/player in your case) and the other node received it and stored it in a local variable.
my script for the subject (Army):
signal ArmyPosition(armyPosition)
func _physics_process(delta):
emit_signal("ArmyPosition", position)
pass
my script for the other one (this one's the MovementLine):
func get_ArmyPosition(newPosition):
AverageArmyPosition = newPosition
pass
and then I had the world connect the two:
onready var Army = preload("res://Army.tscn")
func _ready():
var army = Army.instance()
add_child(army)
army.connect("destination_changed", $MovementLine, "_on_destination_changed")
army.connect("ArmyPosition", $MovementLine, "get_ArmyPosition")
pass
I know this is clunky and probably performance intensive, but it worked for me :)
I hope this helps!
P.S. I'm new to the forums, so sorry if the tabs are weird but I couldn't figure out how to indent properly in the code block