Hello, bit of a noob here.
I have created some enemies who fire fireballs. I set the position of the fireballs like this
var f = Afireball.instance()
f.position = $Position2D.position
which works, the fireballs fire from the enemy. The fireballs are however linked to the enemy so when the enemy moves the fireballs move with it. I did some investigation and found a set as toplevel which seemed like the answer. I tried this in the child creation
and also just set this in the fireballs ready function
but in both cases doing this did seperate the fireball from the enemy but also meant they no longer start at the position I set but in the top left corner of the screen. Does anyone know what I am doing wrong? I dont understand why they no longer start at the position I set? For reference the position is a position 2d node in the parents scene.