I want to emit particles (basically spawn them at specific position / rotation) by using EmitParams, but keep initial particle system’s speed, velocity other properties etc.
Is there a way to do that? Or do I need to extract all properties from the particle system and then re-feed them via EmitParams?
Anything not set in the EmitParams struct retains the default setting.
It is also described here: Unity - Scripting API: ParticleSystem.Emit
1 Like
Okay, but it still doesn’t look right.
I’m doing this:
ParticleSystem.EmitParams emitParams = new ParticleSystem.EmitParams();
emitParams.applyShapeToPosition = true;
emitParams.position = position;
if (overrideRotation) emitParams.rotation3D = rotation;
foreach (ParticleSystem system in _ps) {
system.Emit(emitParams, particleCount);
}
I need to specify world position of the emitter, not the particle itself somehow. Basically simulate placing particle system at world position.
If I override the rotation3D - it overrides the particle rotation, not the rotation of the emitter itself.
Is it still neccessary to place that system’s transform at position / rotation in order to achieve that?
Edit : Yeah, it seems to be the case.
1 Like
xVergilx:
Is it still neccessary to place that system’s transform at position / rotation in order to achieve that?
Edit : Yeah, it seems to be the case
There is an alternative: set the transform within the shape module instead, prior to calling Emit.
1 Like