How to consistently add to Actor Location

Hi guys,

Gosh I forgot how this was supposed to be set:

I am getting the actor location and adding 1 unit to its X axis for each tick so that it keeps moving along that vector.
The problem is that the actor’s speed while it moves is not constant, it slightly changes (due to framerate I guess).
I remember that I had to do something with delta time or delta seconds to make the movement speed consistent and unchanging but for the love of me I cannot recall how.

Could you please give me a nudge?

Hey EminorReal,

What I would recommend that you do is use a custom event instead of tick, that way you can control exactly how often your movement is being called.

Have a look at the screenshot I have below to see the blueprint setup I used to achieve a smooth movement result:

Let me know if that doesn’t work for you, and I’ll be glad to help you look for an alternative.

Have a great day!

Thanks for your answer Sean,

Unfortunately that doesn’t work for me, the movement of the actor becomes laggy even if I set the units down to 0.00001 increments

Interesting. Would you mind bringing up your console using the ~ key and then typing in stat FPS?

Let me know what your FPS is at currently. It might also be worth setting t.maxfps to something like 30 or 60 depending on the power of your PC to see if that helps you get smoother movement.

that’s around 39 and 45fps. Though I do have AA off and that might be the culprit.

So far limiting at 30fps seems to be doing the trick. Thanks man! I’ll keep an eye on possible changes but for now this seems to fix it and since the project is an old school 2d 30fps is all I need.

Awesome help mate, thanks again.

Simple!

1 Like

Ahhhhh yes! Multilpying it right! Gosh my brain sometimes xD

Thanks guys, you’ve both been very helpful.

EDIT: Ehm, So now that I have two correct answers how do I vote both of them? xD

It’s your choice :slight_smile:

hey there, it doesn’t work for my character. any help please?
my character is walking inplace and when i press w it can’t move forward.
please help me with any hint.