Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Rotate particle system emission direction

Discussion in 'General Graphics' started by reuko, Apr 15, 2018.

  1. reuko

    reuko

    Joined:
    Nov 4, 2014
    Posts:
    5
    Hey y'all. I'm trying to rotate a particle system's emission direction over lifetime while keeping the affected particles in world space. The goal is to have the particle system tumble around on all axis while shooting a stream of 'fluid' out from the same vector.

    I've tried setting this system as a sub emitter in an attempt to inherit its emission direction from a parent particle's current orientation, but no dice :(

    I could attach the particle system to a tumbling rigid body but it would be nice to avoid that if possible.

    Cheers!
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    747
    Hey!

    From what you’ve said, I’d simply advise setting the simulation space to World and rotating the Transform Component (or Shape Module Transform)... but I suspect your problem isn’t quite as simple as this... can you elaborate? (Unless I got lucky and my advice works) :)
     
    reuko likes this.
  3. reuko

    reuko

    Joined:
    Nov 4, 2014
    Posts:
    5
    Thanks for writing back!

    Yeah the emission rotation in the shape module kind of works, although I would need to it rotate that module over lifetime (or by speed), and I don't see that parameter accessible in any of the tabs. Rotating the transform component achieves the effect I'm going for, but I want to base the subemitter's transform component on the orientation of the parent particle its emitting from, if that makes sense?
     
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    747
    Ah ok .. I suspected the problem wasn't as simple as I'd hoped! ;)

    Sub emitter particles should use the orientation of the parent particle when spawning, by default.

    If you disable the shape module on the sub-emitter (or set a cone with a very narrow angle) you should see particles emitted in the same direction as the parent particle was travelling.

    However, this behavior is only applied once, at the instant that the sub-particle is spawned. It will not be continuously applied if the parent particle continues to rotate after the sub-particle is born. We don't have any way to achieve that kind of behavior currently.
     
    theANMATOR2b likes this.
  5. reuko

    reuko

    Joined:
    Nov 4, 2014
    Posts:
    5
    Ah right. If the rotation is applied once per sub particle, then that should achieve what I'm going for. Here's a gif of how it looks now, the arrow is the parent particle and its rotation set over lifetime, the subparticles however are always emitting from the same static vector.

    subParticleDirection.gif
     
  6. reuko

    reuko

    Joined:
    Nov 4, 2014
    Posts:
    5
    The subparticles actually seem to be inheriting their emission angle from the movement vector of the parent particle, instead of the rotation of the parent particle. Another gif to illustrate this, note that inherit velocity is turned off here:

    subParticleDirection2.gif
     
    Last edited: Apr 16, 2018
  7. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    747
    Ah yes that’s correct. I had forgotten. Perhaps we could add an option to let you choose how the emission direction is calculated, but for now, i don’t think we support it :(
     
    reuko likes this.
  8. reuko

    reuko

    Joined:
    Nov 4, 2014
    Posts:
    5
    Gotcha, thanks for the follow-up regardless! Hope the feature makes its way in sometime in the future :)