Particle system physics is based on render speed?

Is there a workaround for this? The behaviour of the particle system is device dependent.

Closest I could imagine is override updateFunction to update the particle system’s speed based on dt since last called, and then run the original updateFunction, pretty nasty.

I think your idea would be the recommended workaround, @sebavan do you have any other idea?

Try to set updateInAnimate = true. When false, the update is performed in the render function (it is false by default for backward compatibility).

Seems that updateInAnimate is only in gpuParticleSystem, which I’m fine with switching to… just no solution for ParticleSystem. Trying to use Babylon’s particle system has taken hours of troubleshooting.

For gpuParticleSystem, updateInAnimate is used in animate(), does babylon call animate() or do I?

Sorry, I thought for some reasons you were speaking about the GPU particle system!

CPU particle systems are already updated in animate, not in render. animate is called automatically for all active particle systems by Babylon.js each frame.

Anyway, I don’t think it’s related to your problem. What you probably want is to set the updateSpeed property of the particle system to something which depends on the time spent since the last update (by default, updateSpeed = 0.01):

    scene.onBeforeRenderObservable.add(() => {
        particleSystem.updateSpeed = 0.01 * engine.getDeltaTime() / 16;

Thanks, that’s less hacky than my initial thought. It’d be nice if this was how it behaved by default.