Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions link scale to certain degrees

  • link scale to certain degrees

    Posted by Peter Zeet on November 28, 2015 at 1:31 pm

    Hi!
    I have a really easy issue with linking scale to rotation, but I’m trying with no success, this is what I’m trying:
    1.I have a vertical line(shape layer) with its anchor point at the bottom of the shape.
    2. I’d like to animate the y scale (via expressions), so when I rotate the line to: 0,90,180..etc the scale is 100% and if the rotation angle is 45,135,225, etc.. the scale is 50
    3.(if going ahead with the rotations it keeps the pattern, that would be great)

    I’ve been trying some messy expressions, but I always miss something and it’s not working at all 🙁

    many thanks!!

    Peter Zeet replied 10 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Kalleheikki Kannisto

    November 28, 2015 at 2:03 pm

    Like so:

    rot = Math.abs(transform.rotation);
    y_scale = 50+50*Math.abs(rot % 90 -45)/45;
    [transform.scale[0], y_scale]

  • Peter Zeet

    November 28, 2015 at 2:22 pm

    works like a charm! thanks!!!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy