Download

-Please Help- Side step like Subway Surfer

Hello UE Community,

I’ve been trying to figure out how to move my character sideways, but I’m not getting desired results.

With this BP my movement is not consistent and I end up in the middle of the cubes. I’m trying to get a set up that can work for 3-8 lanes or however many I need.
Something that I can change the direction, speed, and step range all in a smooth motion. I’ll add the final step animation later.

This is the closest I’ve gotten. Any help is much appreciated, thanks.

Is he suppose to walk to that location or slide there? You can use “component move to”, but that might not work as it’s only smoothly moves components.

You can add a branch to timeline to stop it when he reaches it’s location. Or depending if this is a point and click you can make it an AI that moves to the box you select. But more work since you’ll have to make animblueprint if you haven’t already. But he’ll have animation rather then sliding.

​​​​

For now slide there. This is just prototyping. I’ll add the animation once I get his movement down.

It’s for an infinite runner so you press a button and he moves to the right or left cube. He will also jump to doge objects.

I would like him to always stay centered on a cube unless he is moving to one. I guess I can try and have him move to closes cube center in the +Y or -Y location depending on which direction the player wants him to go.

I’m going for a subway surfer doge left/right kind of thing.

Thanks again.

Why not just get the arrows location and set actor location to the arrow?

That’s what I was thinking just after I posted. But that only works as long as each object I’m traveling on has a arrow or some component to move to instead of moving freely.

I’ll give it a go though. I guess it would be “more to nearest arrow in the right or left direction.” Thanks.

Good news and bad news.

Bad news is I did not get the set arrow location. Good news is I have a way that works, well mostly.

When I first press Left or Right I move the the right about 200 units. From what I see there is nothing telling me to move that far at first, but maybe I missed something. After the first press it works perfectly! This offset also moves me off the platforms.

Thanks.