Hot to avoid lose of framerate on timelines?

Hi guys my problem is pretty straight forward. Im using timelines to control how some sliding doors open and close vertically.

The big issue i have is that i test it in the viewport, no fullscreen, everything works fine, the timeline animates consistently. But when i switch to full screen, in the moment i start losing a few frames, the animation doesnt work properly because its based on the framerate and my machine struggles a bit when in full screen. To put it clear, when NOT using fullscreen, the door goes down and up and it stays in the position it sould. When i use fullscreen play, the door starts animating but the animation ends half way…

Is there any way around this??? because this is completely unacepptable lol. Thanks in advance.

Can you show us how you set up the timeline?

Timeline can skip frames, including those, that set your door fully open or closed. In your timeline update don’t rely on previous state, instead rely on value you get from timeline. On timeline completion you should explicitly set the final state. In you case you should explicitly set door fully open or closed.

Here is a setup that will definitely work

You can (should) check if something physically blocking the door from opening or closing by parsing sweep hit result. Then you can select a behavior to handle this situation. Possible solutions: stopping the door; reverting the door state; moving away the object that blocks the door. Or you can disable collision on the door while it moves.
If you want door to push objects then uncheck Sweep tickbox.

Why should i check if something is blocking the door? the door doesnt have physics activated. And it never stops when objects are in the way (as the character itself). The animation plays correctly when in viewport mode. But not in full screen mode (because of the lose of framerate).

I will try to implement your method, but i was hoping to find a simple explanation because i have now too many doors i need to modify (they are not child blueprints because each door has different functionallity and components, one open to the sides and it needs a key, other opens in a regular way, other one is a double door… etc) and its going to be a pain. But we will start with one of em.

Unbelievable that UE doesnt have any functionallity to avoid losing frames in cases like this… o.O

By the way, when do you call the custom event to change the playrate?? is that needed at all?

Thanks.

Not OP. The explanation is excellent and deserves an upvote! I’ll just add that it pays off (in animation consistency) to have data prepared before starting the Timeline. Precisely like in the ortroll’s example where the start/end vectors are stored in separate variables.

[…]because i have now too
many doors i need to modify (they are
not child blueprints because each door
has different functionallity and
components, one open to the sides and
it needs a key, other opens in a
regular way, other one is a double
door… etc) and its going to be a
pain.

This is precisely the point of inheritance. You implement the opening/closing functionality in the parent and have every child handle their own details. Next time you need to do some maintenance, you update parent only. Alternatively, contain the OperateDoor functionality in a component and then just add the component to every door that needs it.

You can take it even further and create a component for each type of behaviour and grant it to the actors that require it.

By the way, when do you call the
custom event to change the playrate?
is that needed at all?

Play Rate controls the speed at which the Timeline plays out since one can’t control its length directly. Not needed unless you want to use speed different than the default Timeline rate.

Yup, the explanation is perfectly fine, thats now was i was talking about lol. I meant that i wish there was an extra option to check if the framerate is under a threshold or something and adjust the timeline drop dynamically, without the need of doing extra stuff.

Yup i know how parent-child classes work, but if i have a regular door that rotates instead of moves i cant use the same parent blueprint, for obvious reasons. Unless i write extra piece of code to handle rotation as well. That is what i meant. Or i am missing something here? how can i make a door to rotate instead of moving just using the exact same code without adding rotation control variables or anything else? i thought this was pretty obvious, but if you say that it can be done…

What if I don’t want to set the position because that would prevent the movements of my dash from combining with the movements of my jump? I need that addlocationoffset

This is another case. For dash you should get your current location, add direction vector multiplied by dash distance multiplied by deltatime in update of timeline.