So I have simple setup.. i want to spawn a series of asteroids as enemies and i want to have a particle attached to each one of them. this works great except the very first time.
The very first time it happens the particle i attach is orphaned and doesn't attach.. but all later ones are attached properly.
one hack was to spawn one off screen starting out, but i just don't like it behaving like this and would like to find a more elegant solution.
Develop games in your browser. Powerful, performant & highly capable.
I saw your previous post and was in the process of answering it works for me if I put the particles in a container with the asteroid. Then when you create an asteroid the particles are created along with them. Then pin them on created as you had in an event. It works fine for me even with the first spawned asteroid. There will be a logical reason why it doesn't happen for you, can probably be debugged to find a solution. This might sound obvious but maybe it wasn't considered as a possible reason behind it, is your first particle object already in the level so it is not created and therefore will not trigger the on created event for pinning?