Expression to maintain distance wile scaling

Scripting for After Effects

Expression to maintain distance wile scaling

Postby Skrytis on 08/12/2018, 9:59 am

I have a comp with 14planets that span a scale difference off 2600 between the smallest and the biggest. I want to go from the smallest one to the biggest in ascending order while the planets move to the left in the shot. In order to not loose resolution my idea was to lock the scale to the position of the planets and scale everything down as they move to the left. I do this by connecting it to the CC sphere radius and center. My problem is that I can't figure out how to maintain the relative distances between the planets while I scale them. I don't want to animate this by hand because my director might want to change things around, so I need the comp to be as responsive as possible
Skrytis
 
Posts: 1
Joined: 08/12/2018, 9:50 am
System Specs: Build: Element x64 2.2.2 (2160.hotfix)

OS: Microsoft Windows 10 Pro 64-bit 10.0.17134

CPU: Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz
RAM: 16300MB

GPU Vendor: NVIDIA Corporation
GPU: GeForce GT 755M/PCIe/SSE2
GPU Driver: 10.18.15.4240
GPU RAM: 2048MB
GPU Code: 0

CL0: GeForce GT 755M (50.0%) (GL Interop)
CL1: Intel(R) HD Graphics 4600 (50.0%)

Return to After Effects Expressions