Download

SetActorLocation lagging at high velocity

I’ve got a car and a static mesh actor in my scene. Inside the vehicles tick function I’m setting the actor location to the same location as the car.

This works well but as the car speeds up, the static mesh starts lagging behind.

In this video at 0:14 you can clearly see that the cube can’t catch up with the vehicle and slowly falls behind:

https://drive.google.com/file/d/1Qow…GlW9Mdfxs/view

Anyone knows how to prevent that lag? Tried without the teleport flag as well.

Thank you!

Are you sure you’re driving the car in a totally straight line? I notice at then end of the vid, the cube goes way off when you turn the car. Could it be you’re turning the car slightly during the test?

It certainly happens when you don’t steer at all.

Figured out a solution. Multiply the vehicle velocity with the delta time and add that to the final location.

An alternate solution is to set the tick order to "post physics"for that actor. But you might have to do that anyways if you start to notice that your rotation also lags behind.

changue for Simple Move To