I’m trying to make an endless runner of sorts. Car is able to go left and right, And the track itself goes forwards and backwards.
I wanted the track to be really procedural. So I don’t have to make 100x pieces of track. I want it to just naturally make track and then have it come past the car.
I’ve been thinking about it and there’s only really a few options. The car doesnt actually make contact with the road and there isnt any physics as of yet. your basically floating with “illisions"of driving.
A spline based approach with spline mesh.
This only really works if your vehicle moves. A spline mesh cant be moved unless you loop through every piece (Which there would be many) every frame.
= Performance
= Endlessly unique
= Doesnt work static (Will eventually get drift if traveled to far from 0,0,0)
A prebuilt track layer with static meshes.
This requires building 100s of types of track to fit them all together at runtime.
= Performance
= Endlessly unique
= Does work static
Maybe if there was some way to turn a spline mesh into a static mesh
Ok further research shows this isnt really possible. You can do it in editor. but not at runtime, least not in blueprints well. Apparently in in c++ thats a monster task.
I am thinking perhaps of a Space Harrier like setup, or the classic Outrun from the 80s. You have logic to move the car left and right. Then spawn columns and trees and objects out ahead of you that move toward you based on your global speed variable. And they might also move left and right as you are turning. It might look decent and even work decent if done right.
But overall I see what you are getting at, track pieces that could be merged together. It is kind of like bring the world to you VS having the player / vehicle actually moving through the UE world.
You would have to figure out a weak line of sight to have these columns spawn to create a virtual track that comes at you. That concept is probably how the old Atari 2600 Night Driver worked.