Timeline not "Finishing" even after animation is done playing

Hi, so I’m having an issue where When I run my timeline to open a door, it opens too fast. I found that I could change the speed of the timeline by changing its play rate. But now it takes a long time for the timeline to end, even though the door opening animation is complete. Is there any way I can set the exact time for the timeline to run through and for the animation to finish simultaneously?

1 Like

Can you show the door code on the timeline?

And as you can see, I would want the IsOpen variable to be set after the timeline has finished. But it’s not happening at the right time and it’s messing up other conditions.


Right, classic timeline problem.

image

With timelines, you have to calculate the start and end position, before going into the TL. You’re reading it while in the TL, that’s why it’s behaving strangely, because it can’t ‘catch up’ :wink:

( Also, a delay node has no effect in a TL ).

3 Likes

That would be the solution! Thank you so much!!

1 Like

Hey, I have a follow-up problem going on, but for the door closing. For some reason, the timeline seems to only play for one frame. Setting the speed and delay were just for testing, but when I set a breakpoint on the set relative rotation, it only runs once and then finishes the timeline one frame later instead of running through the timeline at the speed it should. Other than the one frame problem, all of the calculations to close the door work fine.



It could be various things

  1. I always find the debugger a bit flakey and don’t use it.

  2. Are you doing a ‘step into’ or ‘step over’ etc, could make the difference.

Why are you trying to debug it, if it works?

The problem is that the door just slams shut in one frame instead of slowly closing. It opens over time like I want, but when I close it, it just jumps right to the closed position. And I’m sure you’ve done this but I’m out right now and I’m thinking that my start and finish nodes are both equal to 0 so maybe that’s why it’s jumping. I’ll reply to this post again and let you know if that’s the problem.

Alright, I figured it out haha. I was referencing the current door’s values instead of the previous door’s values and I was also playing the timeline in the wrong direction so it was always 0. The lesson here is to make sure you’re referencing the correct member variables from the correct class instance.

1 Like

:sunglasses: