I apologize for bringing this up again :), but
How do I translate another node's coordinates to local coordinates?
This works, AFAIK, although only if the nodes are not rotated
var player_global = global.player.get_global_pos()
var self_global = self.get_global_pos()
var player_local = player_global - self_global
This is my attempt at doing the same using transforms. Wrong.
var player_global = global.player.get_global_pos()
var self_gtrans = self.get_global_transform()
var player_local = self_gtrans.xform(player_global)
Please, what's the correct way of doing this?