Localspace SubEmitter position not correct

I have a subemitter particle system as a child of a master system, which is a child of a muzzle node on a weapon.

The child subemitter is set to emit on birth.

The problem is the position of the child particles spawned is not the same as the parent. If I turn the character left/right, the subemitter particles flare out to the left/right, and eventually come back into the right place when not turning. The whole time the master particle systems particles are in the correct location. Both systems are set to emit in Localspace.

If I swap the ordering of the systems (make the master the child and vice versa) the issue is now present in the opposite particle system.

How can I fix this? Ive tried various things like manually updating the system but can’t get anything to work.

This is extremely easy to reproduce:

  1. Create an empty scene, with a ‘RootNode’.
  2. Create 2 identical particle systems with 1 as a sub emitter. Disable shape, set start speed to 0
  3. Add the particle systems as a child of RootNode, and offset by 5 units in the z-axis.
  4. Attach a script to rotate RootNode in the y-axis over time
  5. Hit play.

The subemitter particles are offset from the parent.

Hi,
I have managed to reproduce the issue. It seems to be a bug. I have created a bug report Unity Issue Tracker - SubEmitter Birth particle is offset when first emitted
The link may not be active yet, it takes some time to filter over to the issue tracker.

2 Likes

Thanks for that Karl,

could you suggest a workaround I could do in script perhaps?

Hey,
Sorry for the delay. I have looked into the bug and found the issue, a fix will be available in a future release and backported to the currently active versions.
The issue is that when a system was not active with particles then it would not correctly update its position(it would be a frame behind). Im not sure exactly how you could work around this, it would depend on how you are doing things.

  • You could always have 1 particle active in the system, it could be hidden.
  • You could discard the first particle that is emitted, wait a frame and then emit again.
  • You could also just use GetParticles and fix the particles if they are offset incorrectly.

If you are able to wait for the patch then that would be the simplest thing :slight_smile:

2 Likes

Amazing, thank you for the explanation too, and I’m happy to hear there is a fix in the works already.

I ended up splitting the particle system into two, and played them separately, but at the same time. Seemed to fix the issue easy enough.

Cheers for the response!

2 Likes

Glad to hear you found a solution. I’m sure this fix will help explain a lot of strange issues that users sometimes encounter:)

2 Likes