Blueprint moving object different distance each time

I have this blueprint setup - an obstacle blocking doorway that is being moved away once the player has a leaver.

But the thing is… It’s moving different distance every time! Sometimes it moves to where it should be, sometimes it moves less and the player can’t squeeze in the doorway anyway! Why is it doing that? Why it moves differently each time even though the numbers are static and do not change? At least they shouldn’t…

Ok, I seem to figure out what’s going on… The distance that blueprint moving the object depends on FPS. I forcefully overloaded the scene to drop my FPS to 40 to test that out. Lockers were barely moving at all. While at 100+ FPS they are moving where they supposed to be.

Does anybody knows how to fix that?

Hi there, you just need to multiply your movement distance by Delta Seconds to make it framerate independent.
That is what the DeltaSeconds pin is for at the EventTick Node :slight_smile:

hth :slight_smile: Marooney

Thank you for your reply!
I seem to be doing it incorrectly:

Either way all it does is just makes the lockers disappear.
Could you please elaborate what exactly i need to multiply here?

Edit.
I tried everything I could think of, googled info about Delta Seconds… You said to multiply the movement distance. So, it supposed to be like that:

But it’s still doesn’t work. The locker just disappears. I’m clearly misunderstanding what I’m supposed to do.

I can see why it would work for rotation. However, I need to make the movement smoothed out at the start and finish to make it look somewhat believable.
Here’s what I mean: - YouTube
I recorded this video as a sound test for my friend who’s making sounds for my project.

If I remove the timeline, then the locker movement will look really weird and artificial.

Hey friend I would try to remove the timeline, something similar to this, here I’m rotating the character until hes facing enemy.

Oh, sorry i did not realize that you use the Timeline for that… I guess i see your problem: You take the already changed Location for the next Lerp. But you need to inerpolate between initial and final location through out the time.
Just try this:

Ah! And since in my variant the location is changing during the animation time, it’s being affected by FPS. Am I understanding that correctly? And by setting the constant initial position we’re fixing that.

Thank you very much! That helped. Also, your hint about Delta Seconds was really helpful as well. I’ve read some articles about it and learned alot.

You are welcome :slight_smile:

Yep, i have just tested this myself. The Timeline executes every frame. So it is pretty much just a TickEvent.

LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.012
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.012
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.197
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.197
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.216
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.216
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.229
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.229
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.243
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.243
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.257
LogBlueprintUserMessages: [ThirdPersonExampleMap_C_2] 0.257