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

28

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

Adobe Community Professional , 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
Adobe Community Professional ,
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