-
expression using markers to animate position not working
I’m trying to have the position of a shape follow a null between two markers on a marker layer. (So, I have a shape layer, a null for movement and another null with markers on it.
I used the expression below for the position of my shape layer, but even though this position:
thisComp.layer(“ball control”).transform.position.valueAtTime(endTime)
isn’t changing after the endTime, the shape moves once the null object moves after that time.Any idea what’s happening? Thanks so much!
beginTime = thisComp.layer(“MARKERS”).marker.key(“beginTime1”).time;
endTime = thisComp.layer(“MARKERS”).marker.key(“endTime1”).time;if (time < beginTime)
thisComp.layer(“ball control”).transform.position.valueAtTime(beginTime)
else if (beginTime <= time < endTime)
thisComp.layer(“ball control”).transform.position
else
thisComp.layer(“ball control”).transform.position.valueAtTime(endTime)