Skip to main content
Known Participant
July 4, 2021
Question

Character tracking but with objects

  • July 4, 2021
  • 2 replies
  • 240 views

Hello,

 

as explained I want to find some way to adjust the spacing between different objects (layers) proportionally just as character tracking works.

 

Thanks

This topic has been closed for replies.

2 replies

angie_taylor
Legend
July 9, 2021

Have you tried using the Align and Distribute panel? Using the distribute options you can automatically adjust the spacing between several selected objects?

Community Expert
July 4, 2021

You'll have to write an expression that looks at the position and possibly the scale of the layer above and adds some specific value to it. Using a slider to animate that value will give you some control.

 

The expression depends on the kind of layer you are using. Explain your design idea a little better or show us a screenshot with the layers positioned manually and give us a detailed description and we can probably help you out.

 

The expression could be as simple as this:

 

ofst = thisComp.layer(index + 1).transform.position;
[ofst[0] + 100, ofst[1]]

 

There is no expression on the bottom layer. The next layer above it has the same X and Y position but the X position has 100 pixels added to spacing the anchor point of each layer above the bottom or Master layer.

 

You can use the layer size instead of the position, you can compensate for layer scale. You can use sourceRectAtTime() to get the size of a shape layer, you can use the position or size of the contents of shape layers. It all depends on your design.

 

You could probably also head over to AEScripts.com and find a script that would automate that for you. I have one called Grid Guide that I use all the time.