Done, go here.
I know it's supposed to be simple and I am ashamed I didn't figure it out yet
But what's the trick again to convert two 2d points to a rotation value? I want to convert a directional vector to a rotation value, and here's what I've got:
Code: Select all
// Get positions Layer1 = thisComp.layer("PosLayer") Pos1 = Layer1.toWorld(Layer1.anchorPoint); Pos2 = Layer1.toWorld(Layer1.anchorPoint.valueAtTime(framesToTime(timeToFrames()-1))); delta = Pos2 - Pos1; radiansToDegrees(Math.atan2(delta,delta));
Title changed to match content of this topic.