justin – what do you mean “the evolution of the position of a point” ?
had given up tryna do this a while ago, but I’ll try find my the code i wrote see if you guys think it was getting anywhere…
t = 0;
totalTime = 0;
while (t < time){
xsp=comp("pan").layer("Null 2").position.speedAtTime(t);
if(xsp==0){
totalTime += this_comp.frame_duration;
t += this_comp.frame_duration;
}
else{
totalTime += this_comp.frame_duration/(xsp/100);
t += this_comp.frame_duration;
}
}
totalTime
ok kinda cant remember how this was sposed to work, might of messed it all up in anger just before I quit.
(also only smoothing the horizontal movement, I'm ignoring any vertical movement)
so "null 2" was assigned the tracking movements of a point in the distance. then i used the speedAtTime() thing to get the speed of how fast it moves.
That IF statement is makes the movie play at normal speed (it is saposed to make the movie skip a frames but didnt bother tryna work it out.
and the else part which is the main part of the code, is sposed to slow down the movie based on how fast the point is moving across.
cant quite remember how it is sposed to work,
if goes from the start frame to the current frame working out how long each frame should last, based on how fast the point is moving across, and adding each frame to the totaltime value, it then uses this total time as what the remaped time should be.
xsp is the speed, so the higher the speed the shorter the current frame duration is (? is that right?) and the "100", i have no idea what this number should be.
what i think is the biggest problem and i think why i quit, was everything got real messed up because it calculates the speed off the null point which runs at the original speed.
I cant quite get my head around this...!!!