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

Expression

Community Beginner ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Hello friends,

i have a question. I set an expression to add the same position to an other plain but also had to change the anchor point. if i want to change the size of the one plain its not possible anmore because of the changed anchor point. can ynbody help?

 

TOPICS
Expressions

Views

232

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

LEGEND , Aug 03, 2021 Aug 03, 2021

Of course all of that can be handled by factoring the expressions accordingly, but you are not offering any real info on what you are actually trying to do/ are doing. In fact it may not even require expressions just making clever use of an effect like Transform. Anyway, it's really not clear what you are talking about. Provide a screenshot of your setup and any other info such as the expressions code where relevant.

 

Mylenium

Votes

Translate

Translate
LEGEND ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Sure it's possible. You simply compensate the different sizes and anchor point placement with subtracting and adding the differences.

 

Mylenium

Votes

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
Community Beginner ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Mhh i dont understand. I want to change the size like proportional like the anchor point is in the middle of the object, but i had to change the anchor point for the expression already so that it is not in the middle anymore, so i cant change size proportional 😞

Votes

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
LEGEND ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Of course all of that can be handled by factoring the expressions accordingly, but you are not offering any real info on what you are actually trying to do/ are doing. In fact it may not even require expressions just making clever use of an effect like Transform. Anyway, it's really not clear what you are talking about. Provide a screenshot of your setup and any other info such as the expressions code where relevant.

 

Mylenium

Votes

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
Community Beginner ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

ok u are right.. i think its not even expressions.. sorry im a total beginner... i just want to move 2 objects from left to right wich i can do. but then i also want to change the size of one object proportional. therefor the anchor point has to be in the middle of the object. but when i do this the 2 objects dont move in the same sychronic anymore 😞

 

thhhhx so much for trying to help me 🙂

 

Votes

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
Community Beginner ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

when i read my text i think no one can understand what i mean haha

Votes

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
Community Beginner ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

i finally got what u said in ur first comment... yayyyy u were sooo right !!! thanks for helping me !!!! i made it and it is indeed expressions 😄
:)))))

Votes

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
Community Expert ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

LATEST

Scaling always is centered on the Anchor Point. If you want to animate Position you should be setting keyframes or writing expressions for Position. If you need to animate the anchor point so that scaling or rotation changes its center then you need to combine Anchor Point and Position so that you still get the movement you want but the center of Scale and/or Rotation changes. 

 

I wrote an article a million years ago explaining how to rotate square wheels. The Project file will still open. It will convert, but it will open. I customized the workspace so you can see all of the modified properties of the important layers and the expressions.

Square Wheel.gif

Here are the expressions for Anchor Point and Rotation:

// Anchor Point
count = Math.floor(rotation / 90); 
num = count + 100;
val = ( num % 4); 

if (val == 0) { 
	[width, height]
} 
else if (val == 1) { 
	[width, 0]
} 
else if (val == 2) { 
	[0, 0]
} 
else 
[0, height]


//Position
val = Math.floor(rotation / 90); 
x = value[0] + val * width; 
y = value[1]; 
[x, y]

Maybe this explanation will give you some ideas.

Votes

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