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

Expression on a Scale

New Here ,
Jun 07, 2020 Jun 07, 2020

wd.PNG

wdd.PNG

Im making a scale and i want the pan's rotoation to stay still while attached to the beam so i wrote 'thisComp.layer("beam").transform.rotation'. All i need to do is reverse the rotation of this.

 

Pls tell me how to reverse the expression or, if there is a better way tell me that too!

TOPICS
Expressions , How to
439
Translate
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
Valorous Hero ,
Jun 07, 2020 Jun 07, 2020

Use this Expression instead of the one you are now using -

 

-(thisComp.layer("beam").transform.rotation)

 

What I've done is to place a negative Math Operator at the front of the Expression to obtain the inverse of the Parent Layer's rotation property.

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Translate
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 ,
Jun 07, 2020 Jun 07, 2020
LATEST

You way over complicated the process.  You don't need all of the nulls, you just need to move the anchor points to the right place which is incredibly easy with Snapping turned on and the Anchor Point tool (y). The only thing you are missing from your expression is the - sign.

  1. Put the anchor point of the beam right in the center of the beam
  2. Put the anchor point of both Pans (triangles) at the top of the triangles
  3. Position the pans so the anchor point is in the center of the beam - they will have the same Y value
  4. Select the two pan layers and parent them to the beam
  5. Press the r key to reveal the rotation properties of all layers
  6. Start an expression for the first Pan and just type - add a space, then drag the pickwhip you will see in the parent column across from the rotation property to the rotation property of the Beam layer
  7. Right-click on the rotation property in the first pan or use the Edit menu to select Copy Expression only
  8. Select the second Pan layer and paste (Ctrl/Cmnd + v)
  9. Animate the rotation of the beam.

The only expression needed:

 

- thisComp.layer("Beam").transform.rotation

 

All you need in the comp:

Screenshot_2020-06-07 18.20.38_r0v0Tc.png

Took me about 2 minutes. 

 

Translate
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