Rail style strafing ?!

I’m looking for a better way to do a temple run style left and right movement. ATM I’m just using Local offset to move my character side to side by a certain amount but I’m sure there must be a better way.
Basically I want to have three tracks that the character can jump to when I press A or D. Any help would be greatly appreciated.

There must be a better way to do this as when it comes to turning corners I’m running in to problems where the character will not be properly aligned due to not hitting turn on the exact right time. Does anyone know of a way to have him follow a set line. I can’t think of any way to do this it’s hurting my head.

@moderategamer

I assume you want to have a runner like temple runner, where you are automaticly running in a certain direction, but you can switch between 3 lanes (Left, Middle, Right)? If the character should not be able to stop and always run, you should be able to achieve it by a spline in combination with 2 branches, which tells the character, how far out you can go on these lanes. Do you use a character class aswell?

Thanks for the reply I’ve been looking at splines today but it’s a bit confusing tbh as the map is generated automatically so I would have to generate the splines as well. I’m thinking the people that made temple run didn’t actually move the character but in fact moved the map which I wouldn’t have the first clue how to do but it would solve a lot of the problems I’ve been having.

I’d really appreciate if you could explain a wee bit of how I could do it with splines as I’m a noob and know little.