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

Content will not tilt around the centre

New Here ,
Jul 13, 2024 Jul 13, 2024

Copy link to clipboard

Copied

Good day, 
This is breaking my head and then some. I have content that need to rotate around its centre. I want to do this with this expression:

Rotating expression:

amplitude = 1; // Reduced for less tilting
frequency = 0.2; // Slower movement

rotation = amplitude * Math.sin(time * frequency * 2 * Math.PI);
-rotation // Invert the tilting motion to simulate correct movement

Position expression:

amplitude = 60; // Increased for more pronounced bobbing
frequency = 0.2; // Slower movement

y = amplitude * Math.sin(time * frequency * 2 * Math.PI);
value + [0, y]

When use this the rotation seems off centre.  What am I missing?

thanks.

 

 


Its part of a position and rotating expression where the movement of a ship  is simulated. The problem however is that the tilting doesnt seem to be happening from the centre, even as the anchor point is in the centre. 

TOPICS
Error or problem , Expressions , How to

Views

84

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 ,
Jul 13, 2024 Jul 13, 2024

Copy link to clipboard

Copied

When the rotation axis (anchor point) moves around the screen, especially randomly, the center of rotation will look like is moving.

 

Delete the Position expression and add it to the Anchor Point. The rotation should now appear to be around the same point. Try it on a layer that is 800 X 2 pixels with the anchor point at 0, 0. 

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
New Here ,
Jul 13, 2024 Jul 13, 2024

Copy link to clipboard

Copied

LATEST

Good morning, thank you, 
That is the weird part. It looks like the rotation is originated from the bottom left corner.....I checked and double checked.  Whe i apply this expression to 4 different comps they all behave the same....like the centre of the rotation is at the bottom left corner resulting in the fact that this corner/side will not tilt or rotate. 

 

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