I am trying to get the position of the parent object but instead of returning its real value (0,80) in this case, it returns (0,0)
This is the code for getting the position:
extends Node
@onready var animObj = get_parent()
func _ready():
_set_originals()
func _set_originals():
og_position = animObj.position
og_scale = animObj.scale
og_rotation = animObj.rotation
og_size = animObj.size
# Debug
print(og_position)
print(og_scale)
print(og_rotation)
print(og_size)
attached image
An image to describe the problem
I want og_position to return me the value (0,80), the relative position of the parent object.
New contributor
Yentrix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.