Skip to main content
Participant
May 11, 2022
Answered

How to clamb a shape movement around another by cos,sin expression

  • May 11, 2022
  • 1 reply
  • 256 views

Hi everyone

first of all I abolgize about my bad english.

I need to setup an expression that allow me to move an element manually just around another.

I now that I can move a layer around another by cos & sin expression but then I cant move it manually.

any suggestion ?

 

 

This topic has been closed for replies.
Correct answer Dan Ebberts

Try this position expression:

radius = 100;
p = thisComp.layer("Other Layer").position;
v = position - p;
length(v) > .001 ? p + normalize(v)*radius : p + [radius,0]

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
May 11, 2022

Try this position expression:

radius = 100;
p = thisComp.layer("Other Layer").position;
v = position - p;
length(v) > .001 ? p + normalize(v)*radius : p + [radius,0]
yoyopopoAuthor
Participant
May 11, 2022

It's work. Thank you very much!