How to update Position of Particle-Systems using Helper functions

This should be easy but not sure why it’s not working. The following example I tried following the suggestions in different documents/posts to move the 4 particle systems.

However, the orb does not move from (0,0,0) in this scene, nor in my other scenes.

The orb moves easily in Inspector using the World_offset fields.
But after using the Helpers, I can’t list the named-properties for the particle-systems,
to use any of the 4 test-methods in the playground code.

What’s the best way to update all 3 coordinates for the FOUR particle systems in this example? I want to move all four to a new location on-demand.

The CreateFromSnippetAsync function is returning a promise. You can deal with it like this:

Ok makes sense, thank you! However, this method only works in the Playground. (?)

When I put same code into a file page displays as BLANK.

Is there something else needed for this to move and render particle-system on a page? Or another method that can work in a file?

No, it should work everywhere.

Have a look to the console of the browser, you may have errors there.

Make sure you tag the function with the async keyword (see how it is done in the PG).

I’ve had some canvas problems in other snippets that I ported from playground to files. This may be another canvas rendition problem:

There may be some problems with your porting :slight_smile:
If you want to download a PG example, there is Download button for .zip archive.

1 Like

Thanks for the polite nudge. :slight_smile:

Yes there was another important difference in the code:

< var P3 = await BABYLON.ParticleHelper.CreateFromSnippetAsync(“UY098C#3”, scene, false);
< P3.emitter = sphereSpark;

> var P3 = await BABYLON.ParticleHelper.CreateFromSnippetAsync(“UY098C#3”, scene, false).then(system => {

                  system.emitter = sphereSpark;


it’s working now.