Page 1 of 1

opacity depending on another layer position

PostPosted: 11/22/2017, 11:37 am
by huesped
Hi guys, I need some help. I would like to change the opacity of a layer (from 0 to 100%, "hold keyframes" style) based on the position of a layer on another comp.


So basically, it would be a layer showing up once we move another layer (in another comp) to a certain position.

Any help is welcome, thanks!

Re: opacity depending on another layer position

PostPosted: 08/14/2018, 11:21 am
by huesped
Still looking for a way how to do this >-||

Re: opacity depending on another layer position

PostPosted: 08/14/2018, 8:08 pm
by hans123
Hello huesped,

try this Expression (copy/paste to the Layer Opacity):

if (thisComp.layer("Solid 1").transform.position[0] <900) {0}
else {100}


Solid 1 = Layer you want to move.

thisComp.layer("Solid 1").transform.position[0] <900 -if the X position is lower then 900, opacity is set to 0- {0}
-if not, opacity is set to 100- else {100}

These two lines are for the Y Position:

if (thisComp.layer("Solid 1").transform.position[1] <500) {0}
else {100}


You can only use X or Y, not both at the same time.


For more Information see here: http://www.motionscript.com
http://www.motionscript.com/mastering-e ... ing-4.html


Hope this can help you.


Hans