How to move partices along local axis using script?
#8
(11-20-2019, 07:43 PM)tyFlow Wrote: Get the particle TM...then use the appropriate row as your axis of movement.

So if you want to move the particle along its z-axis by 10 units, you'd add (particleTM.row3 * 10) to its position.

Hi, I have same task - need move particles along their local Y-axis (500mm). Can you help me? Thank you.

Code:
public void simulationStep()
{    
    for (int i = 0; i < eventParticleCount; i++)
    {
        int sInx = tf.GetSimIndex(i);

        float eventAge = tf.GetEventAge(sInx);

        if (eventAge == 0)
        {
            Matrix3 particleTM = tf.GetTM(sInx);
            //What I need place here for move particles along their local Y-axis (500mm)
            tf.SetTM(sInx, particleTM);
        }        
    }    
}
  Reply


Messages In This Thread
RE: How to move partices along local axis using script? - by FirePro - 02-07-2020, 09:33 AM

Forum Jump: