Highlighted

## Expression on a Scale

New Here ,
Jun 07, 2020

Copied

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

Views

211

Likes

Report

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

## Expression on a Scale

New Here ,
Jun 07, 2020

Copied

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

Views

212

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 07, 2020 0
2 Replies 2
Jun 07, 2020

Copied

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.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 07, 2020 0
LATEST
Jun 07, 2020

Copied

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:

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 07, 2020 0
Resources
Troubleshooting FAQs
After Effects Community Recap
Getting started with After Effects