• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

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

New Here ,
May 11, 2022 May 11, 2022

Copy link to clipboard

Copied

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 ?

 

2022-05-11_140023.png

 

TOPICS
Expressions

Views

48

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 11, 2022 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]

Likes

Translate

Translate
Community Expert ,
May 11, 2022 May 11, 2022

Copy link to clipboard

Copied

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]

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 11, 2022 May 11, 2022

Copy link to clipboard

Copied

LATEST

It's work. Thank you very much!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines