Skip to main content
Participant
July 12, 2024
Answered

Ease out function with trace path not working

  • July 12, 2024
  • 3 replies
  • 343 views

Hi there,

 

I'm writing an expression that connects an objects scale to it's Trace Path progress value, so that as the object travels down a path, it scales up. But I don't want the scale to be linear, I want it to ease up in value as it completes the path.

 

I wrote this expression for the scale property of the travelling object:

a = effect("Trace Path")("Progress");
x = easeOut(a, 0, 100, 0.3, 100);

[x[0],x[0]]

But I keep getting the error: "Undefined value used in expression (could be an out of range array subscript?)"

 

The error confuses me as I thought I had defined all variables needed for the expression. Any thoughts on what I'm missing?

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Rick Gerard

You do not need the array in the last line:

a = effect("Trace Path")("Progress");
x = easeOut(a, 0, 100, 0.3, 100);
[x, x];

3 replies

Legend
July 12, 2024

x is a single value not an array

I think the last line should be:

[x, x]

 

Rick GerardCommunity ExpertCorrect answer
Community Expert
July 12, 2024

You do not need the array in the last line:

a = effect("Trace Path")("Progress");
x = easeOut(a, 0, 100, 0.3, 100);
[x, x];
Participant
July 16, 2024

Thanks! This solved it