Hi,
I'm trying to get and store a nodes X axis position so that another game object can use it to set itself to that X axis.
i.e. centre the Player to a ladder.
Currently I can only get both the X and Y, but I just wish to use the X.
I get the Ladders position with:
var ladder_position
func _ready() -> void:
ladder_position = self.position
Then in the Player script I use:
func _on_Ladder_on_ladder() -> void:
self.set_position(Ladder.ladder_position)
Incidentally, the Ladder scene is autoloaded allowing me the reference 😉
But obviously I don't wish to set the Player to both axis's, just the X.
What should I do instead?