Skip to content

Instantly share code, notes, and snippets.

@yratof
Created May 18, 2017 20:01
Show Gist options
  • Select an option

  • Save yratof/e2fb3d4294cf5b63198f18c3c66105c8 to your computer and use it in GitHub Desktop.

Select an option

Save yratof/e2fb3d4294cf5b63198f18c3c66105c8 to your computer and use it in GitHub Desktop.
After Effects – Rotation based on two nulls
A = thisComp.layer("yratof_1_2017-10-09_0051_C0008.mov").effect( "Face Track Points" )( "Mouth Right" );
B = thisComp.layer("yratof_1_2017-10-09_0051_C0008.mov").effect( "Face Track Points" )( "Mouth Left" );
SideA = sub(A, B)[1];
SideB = sub(A, B)[0];
radiansToDegrees(Math.atan2(SideA, SideB)) + 180;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment