ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression to keep layer centred even if comp size changes

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jesse richards
Expression to keep layer centred even if comp size changes
on Apr 2, 2020 at 5:47:52 pm

Hi all.

I'm looking for an expression that can be applied to the position of a layer that keeps it centred to the composition even if the comp size and ratio change.

I'm guessing its somehow dividing the comp height and width by 2 but not sure how you do that in an expression.

Thanks in advance

Jesse



Return to posts index

Dan Ebberts
Re: Expression to keep layer centred even if comp size changes
on Apr 2, 2020 at 6:03:46 pm

Try this:

[thisComp.width,thisComp.height]/2

Dan



Return to posts index

jesse richards
Re: Expression to keep layer centred even if comp size changes
on Apr 2, 2020 at 6:06:17 pm

Works perfectly. Thanks so much!



Return to posts index

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