-
How to start an animation on event?
Hi!
I have a layer with an animation and a null object. I need to set the animation to start when the null passes anchor point of the layer on x axis…
Here’s the overall algorithm that I’m using but the problem is that I don’t know how to find the time when above condition happens!nullObject = thisComp.layer(“null”);
nullObject = nullObject.toWorld(nullObject.anchorPoint);
layPos = thisLayer.toWorld(thisLayer.anchorPoint);
trackValue = layPos[0]-nullObject[0];if (trackValue <= 0) {
t = ??? // algorithm to find time…
} else {
t = time;
}value=value.atTime(t);
Can anyone help me with this?
Thanks in advance!