position2d is not where it should be

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

hello. i have issue with position2d i think.

to get the position of my fireball, i must take it far behind my player to make it come out right inn front of the character. does it the position in the scene it was made in make it differ in other scenes when instanced?

if Input.is_action_just_pressed("ui_focus_next"):
	var fireball = FIREBALL.instance()
	fireball.position = $Position2D.global_position
:bust_in_silhouette: Reply From: BraindeadBZH

If you add your fireball as a child of your position2d then you would not need to reposition it.