-
Adding + wiggle to the final value somehow messes the expression.
Hi, im making an expression so i can trigger animations i made with keyframes that are located between markers using a expression with a slider, from 0 to 100.
Im using a checkbox just in case i want to invert the rotation value.
this is the expression for the rotation value.code that works:
chkBx = effect("MONITOR A INVERT ROTATION")("Checkbox");
s = thisComp.layer("MOVEMENT VJ").effect("MONITOR A MOVE")("Slider");
m = thisComp.layer("MOVEMENT VJ").effect("MONITOR A MOVEMENT TYPE")("Menu")
m1= thisComp.marker.key(m).time;
m2= thisComp.marker.key(m+1).time;
t = linear(s,0,100,m1,m2);
v = valueAtTime(t)
if (chkBx == 1)
v*-1
else
vSo far so good. This is working as intended.
However i want to add the capacity of wiggling the rotation of the object in question, controling the amount with a slider
it messes up the expression and what i get is not the actual expected result from the slider as if the expression is working but the actual value of the keyframes in the timeline + the wiggle.code that doesnt work:
chkBx = effect("MONITOR A INVERT ROTATION")("Checkbox");
lev = wiggle(0.5,linear(effect("MONITOR A LEVITATE")("Slider"),0,100,0,3))
s = thisComp.layer("MOVEMENT VJ").effect("MONITOR A MOVE")("Slider");
m = thisComp.layer("MOVEMENT VJ").effect("MONITOR A MOVEMENT TYPE")("Menu")
m1= thisComp.marker.key(m).time;
m2= thisComp.marker.key(m+1).time;
t = linear(s,0,100,m1,m2);
v = valueAtTime(t)+lev
if (chkBx == 1)
v*-1
else
vI have tried variations of the above code,
such as, trying to just add the wiggle to the valeu in the end.
trying to add a simple (0,0) wiggle, and it still messes the expression up.Any one know any possible reason for this?