Skip to main content
Abdelkrim Ibrahim
Participating Frequently
December 21, 2021
Answered

motion script: ease function doesn't work as intended

  • December 21, 2021
  • 1 reply
  • 331 views

I wanted to link an animated property to a marker.

This is the property keyframes that I wanted to map according to the marker.

I used this expression and I was expecting it to work properly.

var markerIn = thisComp.layer("Animation Markers").marker.key(1).time;
var startTime = markerIn-0.25 ;
var endTime = markerIn+0.25;

var valueMin =transform.opacity.key(1).value;
var valueMax =transform.opacity.key(2).value;
ease(time, startTime , endTime, valueMin, valueMax);

However, there is weird issue when it comes the final output of the animation.

The interpolation of the animation returned by the ease function, starts the animation way too early as you can and not from the startTime value, as you can see it starts after a few frames and I can't find any correction for this issue.
I appreciate your help if you can help me fix this issue, and thanks for passing by and reading this thread.

This topic has been closed for replies.
Correct answer Dan Ebberts

startTime is a reserved word, representing the start time of the layer itself. Try changing your variable names to tStart and tEnd (or something similar).

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
December 21, 2021

startTime is a reserved word, representing the start time of the layer itself. Try changing your variable names to tStart and tEnd (or something similar).

Abdelkrim Ibrahim
Participating Frequently
December 21, 2021

Thank you so much for you help.