0 Replies Latest reply on Mar 10, 2015 1:38 PM by jose.a

    Problem with the expression of inertia

    jose.a

      hi I have a problem with the expression of inertia 

       

      n = 0;

      if (numKeys > 0){

      n = nearestKey(time).index;

      if (key(n).time > time){

      n--;

      }

      }

      if (n == 0){

      t = 0;

      }else{

      t = time - key(n).time;

      }

       

       

      if (n > 0){

      v = velocityAtTime(key(n).time - thisComp.frameDuration/10);

      amp = .04;

      freq = 3.0;

      decay = 6.0;

      value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);

      }else{

      value;

      }

       

       

      when I use this expression on a layer, I get a poster. This poster tells me 

      warning after effects: an expression was disabled as a result of an error  Error on line 19 "scale" layer property XX (name of layer.TIF) of composition "composition 1". Invalid numeric result (divide by 0?) 

       

      The code is well formulated. I use this expression before and it worked fine

       

      I need help please 


      please excuse my English. I speak Spanish and I use Google translator. 



      Jose. A


      Captura de pantalla 2015-03-10 a las 5.37.46 p.m..png