Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Feedback Legacy Particle System Updater

Discussion in 'Particle System Previews' started by richardkettlewell, Jan 2, 2018.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    Really? Then add a few extra emit controls ;)
     
  2. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    Waht will be new features of standard particle system ?

    What is the roadmap for standard particle system ?
     
    Last edited: Apr 7, 2020
    laurentlavigne likes this.
  3. junyanA

    junyanA

    Joined:
    Jun 5, 2020
    Posts:
    2
    When I put the file into the folder made by myself in the project folder .I didn't find the option in th asset.I use 2017.4.40c1.Please help me!
     
  4. junyanA

    junyanA

    Joined:
    Jun 5, 2020
    Posts:
    2
    I find! I must slove other problem!! thanks
     
    richardkettlewell likes this.
  5. masatonagai

    masatonagai

    Joined:
    Oct 4, 2020
    Posts:
    2
    I found a new prob with rndForce - forceOverLifetime conversion.
    Legacy_Particle_System_Updater(v1.5) ignores rndForce when Force is not zero vector but legacy system does not ignore rndForce in the case.
    Here is a diff to fix it.
    Code (CSharp):
    1. @@ -471,20 +471,13 @@
    2.              // Force over lifetime
    3.              Vector3 linearForce = serializedObjectAnimator.FindProperty("force").vector3Value;
    4.              Vector3 rndForce = serializedObjectAnimator.FindProperty("rndForce").vector3Value;
    5. -            if (linearForce.sqrMagnitude > Mathf.Epsilon)
    6. -            {
    7. -                forceOverLifetime.enabled = true;
    8. -                forceOverLifetime.x = linearForce.x;
    9. -                forceOverLifetime.y = linearForce.y;
    10. -                forceOverLifetime.z = linearForce.z;
    11. -            }
    12. -            else if (rndForce.sqrMagnitude > Mathf.Epsilon)
    13. +            if (linearForce.sqrMagnitude > Mathf.Epsilon || rndForce.sqrMagnitude > Mathf.Epsilon)
    14.              {
    15.                  forceOverLifetime.enabled = true;
    16.                  forceOverLifetime.randomized = true;
    17. -                forceOverLifetime.x = ConvertToMinMaxCurve(-rndForce.x, rndForce.x);
    18. -                forceOverLifetime.y = ConvertToMinMaxCurve(-rndForce.y, rndForce.y);
    19. -                forceOverLifetime.z = ConvertToMinMaxCurve(-rndForce.z, rndForce.z);
    20. +                forceOverLifetime.x = ConvertToMinMaxCurve(-rndForce.x + linearForce.x, rndForce.x + linearForce.x);
    21. +                forceOverLifetime.y = ConvertToMinMaxCurve(-rndForce.y + linearForce.y, rndForce.y + linearForce.y);
    22. +                forceOverLifetime.z = ConvertToMinMaxCurve(-rndForce.z + linearForce.z, rndForce.z + linearForce.z);
    23.              }
     
    karl_jones and richardkettlewell like this.
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    Thanks. I have moved the script to be a github gist, should be easier to update https://gist.github.com/karljj1/58f16e936d13a94ae6a2f741fd271d91
     
    richardkettlewell likes this.
  7. masatonagai

    masatonagai

    Joined:
    Oct 4, 2020
    Posts:
    2
    @karl_jones Thanks for merging!
    And one more thing, the release note says:
    • Fixed random force calculation when linear force was zero.
    but
    Fixed random force calculation when linear force was not zero.
    is correct.
     
    karl_jones likes this.