-
Enable Clamp Expression on a linked value?
Hello community,
I’ve got the following problem (added an image to make it more clear):
pong.pngAs the ball moves, it’s position in the comp is tracked by a null with the toComp expression on its position value.
I want the red paddle on the left to follow the ball’s Y Position, so I pickwhipped it.
I also want the paddle to stop at a certain value, so it doesn´t go outside the comp in case the ball reaches the top.
The paddle currently is connected to a null.
On that nulls Y Position I’ve addedthisComp.layer(“BallTrack”).transform.position[1];
to track the movement. As soon as I add a clamp expression (for example clamp(transform.yPosition,-225,600)) the value is stuck at (in this case) 600.
I’ve tried several things like putting it before or inbetween, nothing seems to work.I’m pretty much at a beginner level and this is my first post on the forum, please go easy on me.
Thanks a lot
-Michael
thisComp.layer("BallTrack").transform.position[1];
clamp(transform.yPosition,-225,600)