How to make an actor move to a certain location.

I want the flor to move down like an elevator, but cannot seem to get it to move. Not sure why it will not move though. I want the movement to be continues instead of it being teleported. Here is the code I have currently.

You need timeline for this and move every tick only the fraction of distance depending on the fps.

Would you be willing to share an example?


Set it up like this and in your case it is probably even simpler you just need to set the value in graph which can be in your case the Z-axis location.

Be careful that SetActorLocation is not working too well with physics AFAIK.

It’s better to Set Relative Location and have a Scene Component as the Actor Root and the platform as a child.

The scene component will act as the actors Origin and a world Location/Rotation anchor.

You’ll also want to use LERP to smooth the movement.

2 Likes

Bonus, Multiplayer setup (Netmode Play as Client)
edit… Forgot to note “Class Defaults → Actor Replicates”

None of these solutions are working for me. I am also not looking for an elevator that can go both up and down. I just have a platform that I want to slowly go straight down. I have had better results with using the timeline alone, but it causes the platform to go diagonal instead of straight down.

got it