Attention | Topic was automatically imported from the old Question2Answer platform. | |
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)?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
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)?
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.