0
Extrapolated null position based on two tracked points
Enthusiast
,
/t5/after-effects-discussions/extrapolated-null-position-based-on-two-tracked-points/td-p/1678459
Mar 13, 2009
Mar 13, 2009
Copy link to clipboard
Copied
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/after-effects-discussions/extrapolated-null-position-based-on-two-tracked-points/m-p/1678460#M148124
Mar 16, 2009
Mar 16, 2009
Copy link to clipboard
Copied
Determine the angle based on teh difference, then use it to drive sinus and cosinus:
Radius=thisLayer.effect("Slider")("Slider");
A=thislayer.Tracker("A").featureCenter;
B=thislayer.Tracker("B").featureCenter;
DiffX=B[0]-A[0];
DiffX=B[1]-A[1];
Ang=Math.atan2(DiffY,DiffX);
X=Math.cos(Ang)*Radius;
Y=Math.sin(Ang)*Radius;
[X,Y]
Mylenium
Radius=thisLayer.effect("Slider")("Slider");
A=thislayer.Tracker("A").featureCenter;
B=thislayer.Tracker("B").featureCenter;
DiffX=B[0]-A[0];
DiffX=B[1]-A[1];
Ang=Math.atan2(DiffY,DiffX);
X=Math.cos(Ang)*Radius;
Y=Math.sin(Ang)*Radius;
[X,Y]
Mylenium
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/after-effects-discussions/extrapolated-null-position-based-on-two-tracked-points/m-p/1678461#M148125
Mar 16, 2009
Mar 16, 2009
Copy link to clipboard
Copied
You can simplify the math a little if you keep everything as vectors:
slider = effect("Slider Control")("Slider");
T1 = thisComp.layer("your_track_layer").motionTracker("Tracker 1")("Track Point 1").attachPoint;
T2 = thisComp.layer("your_track_layer").motionTracker("Tracker 1")("Track Point 2").attachPoint;
T1 + normalize(T1-T2)*slider
Dan
slider = effect("Slider Control")("Slider");
T1 = thisComp.layer("your_track_layer").motionTracker("Tracker 1")("Track Point 1").attachPoint;
T2 = thisComp.layer("your_track_layer").motionTracker("Tracker 1")("Track Point 2").attachPoint;
T1 + normalize(T1-T2)*slider
Dan
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Navarro Parker
AUTHOR
Enthusiast
,
/t5/after-effects-discussions/extrapolated-null-position-based-on-two-tracked-points/m-p/1678462#M148126
Mar 16, 2009
Mar 16, 2009
Copy link to clipboard
Copied
You guys are awesome! $$$ (or ) for the tip jar! :)
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Navarro Parker
AUTHOR
Enthusiast
,
/t5/after-effects-discussions/extrapolated-null-position-based-on-two-tracked-points/m-p/1678463#M148127
Mar 17, 2009
Mar 17, 2009
Copy link to clipboard
Copied
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/after-effects-discussions/extrapolated-null-position-based-on-two-tracked-points/m-p/1678464#M148128
Mar 17, 2009
Mar 17, 2009
Copy link to clipboard
Copied
You simply use the angle my formula spits out --> radiansToDegrees(Ang). You may just need to add 180 degrees to reverse it...
Mylenium
Mylenium
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Navarro Parker
AUTHOR
Enthusiast
,
LATEST
/t5/after-effects-discussions/extrapolated-null-position-based-on-two-tracked-points/m-p/1678465#M148129
Mar 24, 2009
Mar 24, 2009
Copy link to clipboard
Copied
Thanks -- I'll try it!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

