View all expressions
Conditional

Flip Layer Horizontally Based on X Position

Flips a layer’s scale when it crosses the comp’s center.

Contributed by:


flip = (position[0] > thisComp.width / 2) ? [100, 100] : [-100, 100];
flip;

Flip Layer Horizontally Based on X Position

Practical use case

Auto-flips layers when they move past the center of the screen, useful for characters, icons, or objects.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image