ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

toWorld output

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mateo Baldasare
toWorld output
on Aug 20, 2019 at 1:36:03 pm

Hi there!

I'm having some trouble working around this expression. It is a simple rig to align a shape layer to the right/center/left depending on what you select.
It works just fine but I would like to parent this layer to a null object without changing its actual position.

My question is how to turn the specific values that I set into toWorld values, so when I parent it to the null it won't jump to another position.

For instance, how do I turn that "220" into a toWorld output?

Thanks!

y = transform.position[1];
align = thisComp.layer("Settings").effect("Settings")("Align");

if(align == 1) toWorld([220,y]);
if(align == 2) toWorld([960,y]);
if(align == 3) toWorld([1700,y]);


Return to posts index

Alex Printz
Re: toWorld output
on Aug 29, 2019 at 9:24:32 pm



y = transform.position[1];
align = thisComp.layer("Settings").effect("Settings")("Align");

if(align == 1) x = toWorld([220,y]);
if(align == 2) x = toWorld([960,y]);
if(align == 3) x = toWorld([1700,y]);

hasParent ? parent.fromWorld(x) : x;


Alex Printz
Mograph Designer


Return to posts index

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