Search Unity

Rotate particle system emission direction

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

  1. reuko

    reuko

    Joined:
    Nov 4, 2014
    Posts:
    10
    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:
    2,285
    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:
    10
    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:
    2,285
    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:
    10
    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:
    10
    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:
    2,285
    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:
    10
    Gotcha, thanks for the follow-up regardless! Hope the feature makes its way in sometime in the future :)
     
  9. marcopolodeandrade

    marcopolodeandrade

    Joined:
    Jan 18, 2014
    Posts:
    5
    Hi Richard, do you know if we already have an option to chose how the emission direction is calculated? I am having the same issue Reuko had in 2018. Thanks in advance
     
  10. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Hi sorry nothing was added, as dev focus has now shifted to the Visual Effect Graph.
     
    ChaosEaterY likes this.