ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Clamp behaviour confusing

FAQ   •   VIEW ALL
 Clamp behaviour confusing on Apr 28, 2020 at 7:52:12 am

I have this white circle whose y position si clamped between two values.

Let's say the maximum y value downwards is 618. if I drag the ball to values beyond 618(let's say 1000) by dragging the ball downwards in the viewport. The value goes beyond 618 when I keep dragging with mouse pressed but the value jumps back to 618 after I let go of the mouse which is expected. I am all clear till that.

But when I start to move the ball in an upward direction, the circle delays for a bit and then only moves above. I guess the value beyond 618 is the cause of the delay. For eg. Let's say I dragged it till 1000 in a downward direction and if start to move up, it delays for that 1000-618 pixels and then only starts to move up...So I get puzzled by clamps behaviour now

 Re: Clamp behaviour confusingon Apr 28, 2020 at 10:12:57 am

Hi, I think this is just the normal behaviour. You can set the value to something beyond your clamped space, but the expression will limit it to your defined border, in your case 618. But the referenced position would still be the value you entered/ move your circle to. If you would disable your expression while beyond 618 pixels you would see your ball jumping to this position.

 Re: Clamp behaviour confusingon Apr 28, 2020 at 11:38:04 am

There is the normal value, the one before applying the expression. That is 1k. The expression is run and applies a value over that one, the final that is showed. But the normal value is still 1k. The expression can't change that.

If you disable the expression, the ball goes to 1k. Expressions can't change this normal value, they just apply stuff over it. Like a glove. So if your value is 1k, the expression shows 618. When you move it up, the expression checks again to see what the normal value is. So until that value goes under 618, the expression is run over that value, but without changing it. I don't really know how to make this clearer.

Expressions are like a colored glass. You see the things colored, but the glass does not change the color of the things, only the way you see it.

Andrei
My Envato portfolio.

 Re: Clamp behaviour confusingon Apr 28, 2020 at 12:47:30 pm

Ok so is there any way to make it work like we normally expect...........?