-
Calculating Change In Position(Delta) Using Motion Tracking Data
Hi there, I am fairly new to using expressions in After Effects and I am in need of some guidance. I am working on a project where I am using the X,Y position of a Null Object (Generated via a motion track) to calculate the velocity of the tracked object.
This the expression I am using to pull the X,Y position and find it’s change in location every frame:
((effect("X")("Slider")-effect("X")("Slider").valueAtTime(time-(1/3)))^2)+((effect("X")("Slider")-effect("X")("Slider").valueAtTime(time-(1/3)))^2)
I am storing the X,Y position as two slider values, as you can see from the expression.My problem is that even though the X and Y values are changing as they should be, the expression output is remaining at 4.00 and for a specific frame it will jump up to 6.00 and then go back to 4.00. I am baffled as to why, I assume that I am doing something wrong with using the valueAtTime…
Here is a screenshot of all of my sliders and their values: https://i.imgur.com/soLIO.png
And here are all of my expressions: https://i.imgur.com/bUPTv.pngThank you in advance for your help!