Skip to main content
dennisw45701005
Participant
July 15, 2024
Question

Numbered Protractor Mogrt

  • July 15, 2024
  • 1 reply
  • 180 views

I'm having the hardest time finding anything about angle measurement callouts.  I would like to use something that can automate the numerical angle mesaurement to precisely measure the angle between two points. If you know an exsting template or know how to make one please let me know! I'm trying to add callouts to a video in a MOGRT for premiere pro. 

This topic has been closed for replies.

1 reply

Community Expert
July 15, 2024

Add this expression to the Source Text of a Text layer.

 

 

// horizontal clockwise angle measurement with zero to right.
MP = thisComp.layer("Mover").position;
CP = thisComp.layer("Zero Point").position;
v = MP - CP;
A = radiansToDegrees(Math.atan2(v[1], v[0]));
if (A < 1)
	a = A + 360;
else
	a = A;
a.toFixed(1) + "º"

 

 

Changing a.toFixed(1) to a.toFixed(2) will give you one more decimal point, toFixed() will give you whole degrees. The + "º" adds a degree character to the text layer. You can change the fifth line to A = 90 + radiansToDegrees(Math.atan2(v[1], v[0])); so the angle will be 0º when the layers are vertical.

 

Hope this helps.