Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Lock my Position

  • Posted by Nikola Morin on November 8, 2012 at 8:12 pm

    Hi everybody!
    I think is a simple question but i don’t know how to formulate it so…

    I have shape that’s lock on th X axis. here the expression that I use:

    x = value[0];
    y = 110;
    [x,y]

    So i can move the x axis and the Y axis is lock to 110.

    But what i would like is to lock my X axis between two value.
    For example my shape position will be lock betwwen 100 and 400 pixel on the x axis..

    So how should i write this???

    Thank you!!

    Nikola Morin replied 11 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 8, 2012 at 9:04 pm

    Is this what you mean?

    x = clamp(value[0],100,400);
    y = 110;
    [x,y]

    Dan

  • Nikola Morin

    November 8, 2012 at 10:16 pm

    That’s exactly what I meant!!

    Thank Dan
    once again you’ve got the answer!!!

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