[SOLVED] Having issues with a particle system

My project is a space game where flying ships spawn and disappear when hit by a laser. This is successful. When the project is launched, the ships spawn as you would expect. However, a particle system spawns and does not move as seen in the image. It kind of looks like a particles system spawns, flies towards the camera for a very short time, then disappears, but it keeps repeating.

What should I do to fix this? This is the link to my project.

https://playcanvas.com/editor/scene/1630984

Any help would be very appreciated!!!

Also, this issue is in the Level 1 Scene.

Hi @Michael_McPherson!

It feels like a bug to me, where the position of the particle system is not updated correctly after instantiating the EnemyShip entity. If you instantiate the EnemyShip entity disabled and enable it by script after you set the position of it, the problem is gone.

Maybe @yaustar can take a look at this too.

@Albertos Ok. How do I do this?

You can disable the EnemyShip entity by default in the editor (apply changes to template too) and enabled it by script only.

You can also do all by script.

Line 31 of your script:

instance.enabled = false;

Line 34 of your script:

instance.enabled = true;

@Albertos Thank you so so so much!!! You have no idea how much this helps! I’ve been trying to figure out this issue for week!

1 Like

I can imagine! I’m glad this solves the problem. :partying_face:

@Albertos Only one problem… For some reason when I publish it it will allow me to see the main menu but when I press space to advance to the Level 1 scene it says I need to login. When I try it gives me an Error 403

I don’t think that’s related to this problem. Can you create a new topic for this please?

sure

@Albertos I have created a new topic with this issue

1 Like