Skip to main content
Participant
Jul 12, 2024 2:45 AM UTC
Answered

Ease out function with trace path not working

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.
Rick GerardCorrect answer
Community Expert
Jul 12, 2024 3:43 AM UTC

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
Jul 12, 2024 3:47 AM UTC

x is a single value not an array

I think the last line should be:

[x, x]

 

Translate
Rick GerardCommunity ExpertCorrect answer
Community Expert
Jul 12, 2024 3:43 AM UTC

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];
Translate
Participant
Jul 16, 2024 12:41 AM UTC

Thanks! This solved it

Translate