ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Get rotation value of layer that is oriented along path

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Padraic Rapp
Get rotation value of layer that is oriented along path
on Aug 30, 2019 at 2:55:55 pm

Hi!

I was wondering if there's a way to extract a layer's absolute rotation value, if the layer is set to orient along path?

Thanks,
Paddy


Return to posts index

Alex Printz
Re: Get rotation value of layer that is oriented along path
on Sep 3, 2019 at 4:06:31 pm

L should be the layer you want to target that is orientated to a path:

L=thisComp.layer("LayerOrientatedToPath");
v = L.toWorldVec([1,0,0]);
if(hasParent) v = parent.fromWorldVec(v);
radiansToDegrees(Math.atan2(v[1],v[0]))


Alex Printz
Mograph Designer


Return to posts index

Padraic Rapp
Re: Get rotation value of layer that is oriented along path
on Sep 5, 2019 at 11:30:11 am

Hey Alex,

I feel like an idiot for completely forgetting about 'WorldVec'. Thank you very much, worked like a charm!

Paddy


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]