Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

position.velocity NOT working

Contributor ,
Jun 28, 2011 Jun 28, 2011

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?

TOPICS
Expressions
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 29, 2011 Jun 29, 2011

>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

Translate
Community Expert ,
Jun 28, 2011 Jun 28, 2011

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

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 29, 2011 Jun 29, 2011

Thanks, it worked but now I have a problem with border frames

(first or last) as with sampling at slightly different time ends up with no motion next to one of them .

I did a workaround by changing the time delta for this trick dependant on the time value but still it's not full proof.

Any idea why velocity at the exact frame time gives a zero vector?

The speed value is correct so there is motion in these frames (it's not an issue of frame easing)

And again - this totally worked in CS4 so what gives?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 29, 2011 Jun 29, 2011

>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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 30, 2011 Jun 30, 2011
LATEST

Jackpot

That's what I needed, totally forgot that position has two different easing modes (temporal and spatial).

But still I'm totally positive I didn't have to do it in CS4 - probably the tracker was changed or something

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines