Is there a way to save a start_position info node?

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

I’m in doubt, is it possible to save a start position info of a node (kinematicbody) that is a child from another node (2dnode)?

:bust_in_silhouette: Reply From: kidscancode

You can use a variable:

extends KinematicBody2D

var start_position

func _ready():
    start_position = position

Note that position will be relative to the parent node. Use global_position if you want absolute coordinates.