Search Unity

Dissatisfaction with "Render Alignment" of ParticleSystem

Discussion in 'General Graphics' started by IllusionArk-Lee, Dec 17, 2019.

  1. IllusionArk-Lee

    IllusionArk-Lee

    Joined:
    Mar 16, 2015
    Posts:
    8
    align.png
    If you set the ParticleSystem as shown above, moving the object will not affect the particles. But when you rotate the object, the particles rotate together.
    ParticleLocalAlign.gif

    If the Simulation Space is "World", particles that have already occurred may need to look independent of the object (so that rotation is not affected). This need is very much. I think it's nice to add an option like "Local at Birth" to "Render Alignment."

    If there is a way and if I don't know it, please let me know.

    The attached Unity package file was created on 2019.3.0f1.
     

    Attached Files:

  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    I think you want velocity facing particles.
     
    richardkettlewell and karl_jones like this.
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Align to Direction in the Shape Module may also give you what you want, if bgolus's suggestion doesn't work out.
     
    bgolus likes this.
  4. IllusionArk-Lee

    IllusionArk-Lee

    Joined:
    Mar 16, 2015
    Posts:
    8
    This can be solved by "Align to Direction" of the Shape module and "Velocity Facing". thanks for letting me know. The two methods differ when using gravity. The feature I wanted was "Align to Direction" and the "Velocity Facing" feature was also very useful. Thank you for letting me know again.
     
    Last edited: Dec 18, 2019
    richardkettlewell likes this.
  5. AlphaSilverback

    AlphaSilverback

    Joined:
    Aug 18, 2016
    Posts:
    10
    Using Unity 2021.3.21f1, none of these solutions made any difference, and did not solve the issue. There's a weird rotation glitch when the direction you want the particle to be in is not aligned with the forward vector of the mesh.

    For anyone reading this in 2023 The only way I found that always works is manually emitting particles with EmitParams, and setting the correct rotation. In my particular case, this was the solution:


    Code (CSharp):
    1. var particleParam = new ParticleSystem.EmitParams();
    2.                     particleParam.position = hitInfo.point;
    3.                     particleParam.rotation3D = Quaternion.LookRotation(Vector3.ProjectOnPlane(Vector3.forward, hitInfo.normal).normalized, hitInfo.normal).eulerAngles;
    4.                     m_fireSplashParticles.Emit(particleParam, 1);
     
    Last edited: May 18, 2023
    ppytryrsv likes this.
  6. osmanzort

    osmanzort

    Joined:
    May 22, 2019
    Posts:
    21
    I was having a similar problem and was pretty annoyed about this bug. I'm not an expert in Unity or anything but I suspect the problem is about Quaternion/Euler stuff. When I set the rotation of my shape as -89.9 instead of -90 the problem went away.