Staggered Actor Movement

Hello,

I’m working on a game where objects move quickly from one side of the screen to the other Tetris style. For this I’m using a function on a timer that executes SetActorLocation with sweep enabled every 0.01 seconds.

I’m currently seeing a lot staggering in the movement of the actors despite maintaining 30FPS in PIE. I’ve tried enabling VSync via the console but see little difference with that so I think it’s an issue with how I’m moving the actors.

Any ideas on how to smooth out this movement would be appreciated.

Cheers.

Can you show your BP?

Here’s the timer calling the function and the function itself to translate and rotate the actor. The value of actor speed is -15 right now but I’ve tried different values as well as different timer intervals.

285735-screen-shot-2019-08-24-at-30132-pm.png

Well, if you’re running at 30fps, there’s no point in doing something 100 times per second, because the max you can do something is 30 time per second :wink:

A better way would be with a timeline like this ( I left the rotation out for now ):

Timelines run at frame speed, so you’ll always be as smooth as possible this way.

Works for me! Thank so much for your help.