Endless runner. Spline paths

I have no idea what you’ve done actually…

The only thing I can recommend is to zip the project up and send it to me, and I’ll take a look.

( you can make a new project and just migrate the map there )

1 Like

It’s probably something super obvious that i missed… I’ll zip up the project and send it over :slight_smile:
If i migrate the map to a new project, will everything come with it, like the tiles and stuff?

yip…

( you can message me with it ).

1 Like

Ah cool, thanks :blush:

I know it’s been old, but if you are still looking for the solution, the below thing will help you as I tried it on my work.


the Left, right and centre functions consist of the code you used already.
When the player wants to switch the lane, I just get the input left/right and set it to the level Manager( according to my project). If you want you can cast to the game mode and get it in the floor tile bp. Hope this will solve your issue but for the smooth transition, I can’t help as I am still figuring it out. Maybe if I got a solution will definitely update it here.

Cheers.

Sorry to also kick this thread but i’ve followed this for a personal project and it works brilliantly but only except for one track piece I have. I have a 360 loop (the camera is looking diagonally at the track) and the player only makes up part of the track and then teleports to the end of the loop. The spline for the loop is 10 points. Any ideas?

1 Like

So you have a 360 loop made out of 10 pieces. What doesn’t work?

1 Like

Essentially I have a car that follows the spline up until it reaches the point where it goes up instead of forward. It’s made out of piece but the spline has 10 points for a nicer curve, when it reaches the point that sticks out the most and then begins to go up it either freezes in place or teleports to the end of the spline

1 Like

Ah, I don’t think I did up and down, just left and right. Same principle applies though, I will take a look, in a while…

Much easier way of doing this.

You need to know when the character of vehicle is moving. In the 3p I did this

Then in the spline actor BP construction

and runtime

spline follow 2

( not me controlling the character ). The 80 is how much height I needed to add so the player wasn’t drowning in the spline

What is your “Top Scene” reference? I’m having no luck trying to get the car to rotate along the spline either. I am using a Pawn instead of an actor or character.

1 Like

It’s just a scene component in the spline blueprint. You can attach everything to it.

If you’re using a pawn, you might need ‘set control rotation’ rather than ‘set actor rotation’.

Sorry to keep bumping this, I ended up just leaving the loop out because of time constraints. I’m now doing left and right turn tracks (a bit like / shape) but I find that sometimes my pawn won’t rotate along the spline as it should yet other times it does rotate. It seems a bit random to me. Most of my code is similar to what you’ve helped me and others with, this is my code:

This is in my track pieces. I can’t do the conventional way of using delta x spline length as my speed is done by an increment in a widget

1 Like

So are you working with tiles, but the tile surface can be uneven?

So they’re like toy car track pieces, they’re flat but they turn left and right

You need to get the rotation from the spline, that why its there :slight_smile: And you can’t do that with a ‘set relative rotation’ node, it needs to be ‘set world rotation’.

Relative, means relative to its current value. I don’t think that means anything in this case?

I don’t know if that works for you, because the code differs…

Unfortunately, it’s the same result with Set world rotation, it’s like it can’t keep track of if it should rotate or not