ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Wiggle uniform scale of a flipped/non squared ratio layer

FAQ   •   VIEW ALL
 Wiggle uniform scale of a flipped/non squared ratio layer on Dec 3, 2016 at 4:02:13 pm

I want to wiggle a layer with scale aspect like -23,111 or 23,111 and wiggle keeping the ratio. (like if it was parented to a null that is wiggled)

of course when i use the [0] on both axis the result is squared. and if i use 2 wiggles i dont get synced values.

i guess i need to someway multiply the wiggle result with the scale aspect ratio, but what how can i get the per axis value of that ratio? if there is such thing...

thanks.

```w = wiggle(1,5); x = transform.scale[0]/100; y = transform.scale[1]/100; [w[0]*x,w[0]*y]```

 Re: Wiggle uniform scale of a flipped/non squared ratio layeron Dec 3, 2016 at 10:54:41 pm

Like this?

```w = wiggle(1,5); [w[0], value[1] + (w[0]-value[0])];```

Xavier

 Re: Wiggle uniform scale of a flipped/non squared ratio layeron Dec 3, 2016 at 11:13:09 pm

Thanks a lot, but no, this changes the ratio.

lets say you have a layer and its scale is something like [-30 , 100] if you parent it to a null you can wiggle it uniformly with [w[0],w[0]] .
i'm looking for that same result with a single expression without using a null....

 Re: Wiggle uniform scale of a flipped/non squared ratio layeron Dec 3, 2016 at 11:08:21 pm

Hum, seems that i missread the question.
The above wiggles by the same amount to scale[0] and scale[1], but does not preserve the ratio.
This should be better:

w = wiggle(1,5);
if (value[0]===0){[0, w[1]];}
else{[w[0], w[0]*value[1]/value[0]];};