How to wiggle only one axis ?


#1

Hey guys and giols, I just cant find expression anywhere on internet even through gogles. So… can anyone tell me how can I wiggle only Z axis on 3d object ?

Much much thank you’s


#2

actually there is an expressions-thread for questions liek this. But I will overlook it :wink:

you can copy paste this expression:

temp = wiggle(2,50);
x = value[0];
y = value[1];
z = temp[2];
[x,y,z]

the wiggle numbers in the brackets are examples, of course


#3

Thank you Creattive!!!


#4

you can also separate x,y,z position.


#5

You can also entirely separate the wiggle part and then use it as you wish.

// wiggle the position of a layer increasingly over time up to 10 seconds
// the wiggle is uneven - there's no wiggle at all in X, a 1x wiggle in Y and a 2.5x wiggle in Z

wigglePart = wiggle(2,50) - value;
newValue = value + [0, wigglePart[1], 2.5*wigglePart[2]] * Math.min(time,10)/10;

You can also pick up the wiggle from another property. On position of Layer 2 for example:

tLyr1ScaleWiggle = thisComp.layer(1).scale.wiggle(2,50);
value + tLyr1ScaleWiggle;

By the way, Cyzer - do you want to post this in the Expressions thread? It makes sense to keep all this stuff in one place. Someone de-stickied it though.