HI! I have a few layers and I want to wiggle their position. Also I have a null object with wiggle expression on its position. When I pickwhip their position to the position of null object these layers changing their position but I need only wiggle effect without changing the position. How do I achieve that?
I think what you want to do is parent your other objects to the null object instead of pickwhipping to its position.
You can use this expression
var mSource = thisComp.layer("Null 1"); var P1 = transform.position.wiggle(5,10);// this this you layer wiggle value: var P2 = thisComp.layer("Null 1").transform.position; var P3 = thisComp.layer("Null 1").transform.position.valueAtTime(mSource.inPoint); P1+P2-P3;
change the Null 1 to your Null name, it will look like this
If you want to wiggle a bunch of layers at the same time and maintain their relative position you have two very simple options. Parent all of the layers to a null with wiggle() applied to it or Pre-compose all the layers and apply wiggle to the pre-comp. Most of the time I would use parenting.
Using an expression would require you to retrieve the difference between the comp center and the position of the layer that is wiggling and add that value to the current layer's position. The expression would look like this:
src=thisComp.layer("Null 1").transform.position; ofst = src - [thisComp.width/2, thisComp.height/2]; value + ofst;
The expression given by OussK does not work. You could remove the wiggle from the null and a layer containing the expression would still wiggle. Apply the expression to multiple layers and they would all wiggle differently.
I have an animation preset I call Parent Position to Master. All you have to do is change the layer name of the position only parent to Master. Feel free to download it and save it to your custom presets folder.
What I understand that they need to add 2 wiggle effects one on layer position and at the same time pickwhip to a null with wiggle expression, for that, I add .wiggle to the current position, so if you want simply wiggle the Null only you can remove the .wiggle from the P1, so the expression will look like this
var mSource = thisComp.layer("Null 1"); var P1 = transform.position; var P2 = thisComp.layer("Null 1").transform.position; var P3 = thisComp.layer("Null 1").transform.position.valueAtTime(mSource.inPoint); P1+P2-P3;
also, all layers will wiggle the same