Scale only newly emitted particles after parent scale change

In my platformer game, it’s possible to change the size of the player character. The player character also has a particle emission. I set this particle emission to hierarchy scaling, to change the size of the particles along with the players. This works, but changing the scale in this manner immediately scales up all the already emitted particles, which doesn’t look so good.

Is it possible to only change the scale of newly emitted particles after a scale change of the parent object, and leave already emitted particles as they are? I suppose I could use two particle emitters and turn them on and off as needed via a script, but I was wondering if it can be done with a single particle system.

You’ll need to do this with some scripting.

Firstly, set the scaling mode to Local or Shape, to avoid already emitted particles from changing when the parent scale changes.

Next, in script, you’ll want to either:

  1. Do all your emission using scripted Emit() with EmitParams, where you set the size using the parent scale

  2. Emit normally, and use Get/SetParticles in LateUpdate and check the lifetime and only modify the startSize property for particles with a lifetime less than the current Time.DeltaTime