Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

MyParticleSystem.velocityOverLifetime.radial.constant =

Discussion in 'Scripting' started by AnimalMan, Aug 18, 2019.

  1. AnimalMan

    AnimalMan

    Joined:
    Apr 1, 2018
    Posts:
    1,164
    Code (CSharp):
    1.  if (mySystem.velocityOverLifetime.radial.constant != ThisValue)
    2.                 {
    3.                     var dial = mySystem.velocityOverLifetime.radial;
    4.                     dial.constant = ThisValue;
    5. debug.log("No Errors from this code ^ but no execution either,
    6. radial doesn't change; and the method calls repeatedly in Update()
    7. as radial.constant is never modified to ThisValue.
    8. Is this a Unity Bug or is there another method?");
    9. }
    10.  
    11.  
    12.  
     
    Last edited: Aug 18, 2019
  2. AnimalMan

    AnimalMan

    Joined:
    Apr 1, 2018
    Posts:
    1,164
    can somebody else try, its real easy; just attach a P-system to an object, write a script to modify the radial when velocity over lifetime enabled; and please report back to me if you experience the same problems.
     
  3. absurdnoize

    absurdnoize

    Joined:
    Nov 23, 2019
    Posts:
    10
    var velocityOverLifetime = mySystem.velocityOverLifetime;
    velocityOverLifetime.radialMultiplier = ThisValue;