@nathanjwtx said:
Didn't work. If the track is 60 seconds, setting it to 30 seconds essentially halves the entire thing, not shrink everything by 50%, i.e. I get half the whole animation :(
You shouldn't need to the actual length of the animation, just how fast it plays. If you select the AnimationPlayer node, you can edit the speed
field:

Changing the value in speed
will change how fast the animation plays. For example, in the image above it is playing at 1/4 the actual speed of the animation. The animation in the example (the Gui_in_3D demo) is 6 seconds long, so playing it at a quarter of the speed will make the animation last 24 seconds.
The hard part in your case is figuring out what to set playback_speed
(or speed
in the inspector) to.
I think the algorithm for figuring out the speed should be this (untested):
animation_player.speed = 1 - (animation_position / animation_length);
So as long as you know how long your animation is, and where you are starting to play the animation, in theory you should be able to set the speed of the AnimationPlayer node so that the animation always lasts however many seconds it is supposed to.
Granted this will make it where depending on where the animation starts, the actual animation will appear to move at different speeds, but will always end in the same length of time.
Using the example of fading to black, it will always fade to black in N
many seconds. However if it starts near the end as is more black, it will seem to very slowly fade to black. In contrast, if it starts at the beginning, it will seem to fade faster.
If you need, I can probably make a quick example project sometime in the next couple days to show what I mean.
Hopefully this helps!