Skip to main content
Yaroslavyayaya
Participant
February 5, 2026
Frage

Programming in After effects

  • February 5, 2026
  • 1 Antwort
  • 31 Ansichten

have a triangle that is attached to a controller. I need the reference point of the Turbulent displace effect parameter 'turbulence displacement' to be attached to the height point of the triangle's base only on the Y axis. I have also attached the 'turbulence displacement' parameter point to the controller only on the Y axis using the following expression:

PosB = thisComp.layer("Ball").transform.position;

xOnly = PosB[0];

X = thisComp.layer("Controller").transform.xPosition;

Y = thisComp.layer("Controller").transform.yPosition;

value = [X, Y=0]+xOnly;

1 Antwort

ShiveringCactus
Community Expert
Community Expert
February 5, 2026

I’m not following completely but the bottom line of your code should probably be:

 

value = [X+xOnly,0]