What is the meaning of: track_set_key_value: Condition "arr.size() != 5" is true.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By VanDeiMin

I have no clue where the error comes from.
it shows in line:

 _anim.track_set_key_value(0, 1, 0.5)

E 0:00:33.033 track_set_key_value: Condition “arr.size() != 5” is true.
<C++ Source> scene/resources/animation.cpp:1360 @ track_set_key_value()
ChooseCar.gd:725 @ _on_BackTextureButton_pressed()

var anim_player: AnimationPlayer = get_node("AnimationPlayer")
var _anim_list: Array = anim_player.get_animation_list()
var _anim: Animation = anim_player.get_animation(anim_list[0])
_anim.track_set_key_value(0, 1, 0.5)

Can You explain me?

:bust_in_silhouette: Reply From: VanDeiMin

Problem solved.
I’m so stupid.
The solusion is I used bezier tracks.
the correct line is:

_anim.bezier_track_set_key_value(0, 1, 0.5)

I leave the question. Maybe it will save somebody 4 hours searching what went wrong…

1 Like

I thank to a person from 2 years ago.