Skip navigation
Currently Being Moderated

position.velocity NOT working

Jun 28, 2011 8:11 AM

Hi,

I wrote preset with expressions in AE cs4 and it was calculating the direction of layer's motion.

It worked perfectly in CS4.

In CS5 the resulting vector very often has a length of 0 - especially with Nulls that have tracking data applied.

Even though the Null IS moving around.

 

One workaround I found was to use a BakeTransforms script on the Null layer.

The motion doesn't change, but now for some reason position.vector gives a proper value.

 

After some testing it seems that if a Null gets tracking data applied, the position.velocity vector for that null is always invalid

 

Any ideas?

 
Replies
  • Currently Being Moderated
    Jun 28, 2011 9:32 AM   in reply to kaczorefx

    Instead of transform.position.velocity, try transform.position.velocityAtTime(time-.001)

     

    Dan

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2011 9:34 AM   in reply to kaczorefx

    >this totally worked in CS4 so what gives?

     

    Really? For me it's the same in CS4 and CS5.

     

    One other thing you can do is change the spatial interpolation of the keyframes to Bezier.

     

    Dan

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points