#Noob needs help tracking position of spawned Asteroid

1 messages · Page 1 of 1 (latest)

tame marsh
#

The issue here most likely is that Position is referring to the relative position of a node to it's parent. Most likely you want to leverage Global_Position. Sometimes it can be that Position == Global_Position, however that depends on the structure of the scene

river onyx
#

From the rock scene can I export it's global_position for use in my function in main?

tame marsh
#

I don't think that you need that, based on what you shared. Your Rock Scene should react to being hit by a rocket and then trigger Score Board update (maybe by emitting Signal on Eventbus) and then spawn N Midrocks on it's current global_position

#

And it goes without saying Midrock would be responsible for reacting to rocket hit and then trigger Score Board update and spawn N Smallrocks on it's current global_position

#

If rocks have a moving, you can also provide an random direction when creating it, so they fly off

river onyx
#

Yeah the global position of random speed and direction were handled inside the rock script( and midrock etc.) accessing that from Main is proving to be what is the giant confusion for me

tame marsh
#

Sounds like you have a path forward, feel free to ping me incase another question arises