Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Ease out function with trace path not working

Community Beginner ,
Jul 11, 2024 Jul 11, 2024

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?

TOPICS
Expressions
335
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 11, 2024 Jul 11, 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];
Translate
Community Expert ,
Jul 11, 2024 Jul 11, 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];
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 15, 2024 Jul 15, 2024
LATEST

Thanks! This solved it

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 11, 2024 Jul 11, 2024

x is a single value not an array

I think the last line should be:

[x, x]

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines