Simplest way to make a player-controlled road which can move in a smooth curve horizontally and vertically?

Hello everyone! My objective is to produce a flat, thin box to represent a road in Unreal 5.1 and set it up as a Pawn so that:

  • It has a constant velocity in the direction of its local forward vector.
  • When the player presses A/D, it makes a smooth curve up to 60 degrees left/right .
  • When the player presses W/S, it makes a smooth curve up to 20 degrees up/down.
  • It has collision so that another Pawn can move along on top of it.

I have a naive approach I’m using currently that goes like so. For set up and construction script:

  1. Create a child (call it Road) of the default third person blueprint.
  2. In Road, replace the default static mesh with a cube (call it Leader and make it invisible).
  3. Attach an instanced static mesh component to the Leader (call it Segment). For context, Segment is basically a slice of the overall road shape I want when it’s traveling there’s no rotation input being applied.
  4. According to a variable called Count, add Segment instances to the Road at an increasing offset from the Leader.

On player input:

  1. For A/D inputs, add one degree scaled by the input value to the yaw component of the Leader’s rotation. The output is clamped to (-60, 60).
  2. For W/S inputs, add one degree scaled by the input value to the pitch component of the Leader’s rotation. The output is clamped to (-20, 20).

On event tick:

  1. Move the Leader in the direction given by the local forward vector.
  2. Give the first Segment (index 0) the same location and rotation as the Leader.
  3. Interpolate every other Segment’s rotation and location towards the rotation and location of the one in front of it.

While this does give the overall result I want, there are some issues with this approach that make me want to move away from it:

  1. I have no idea how to texture the Road so that it has a consistent look, and it seems like it would be excessively difficult to do so.
  2. Making it move properly is very finicky because I have to set the rotation speed globally and locally as well as the forward velocity to very specific values to get smooth curves, especially left and right.
  3. When moving vertically and horizontally at the same time, the curve is not smooth and there is a tendency for “lumps” to form on the sides of the road.

I tried to address (3) by adding roll to the road’s rotation when it’s moving horizontally and vertically at the same time, but that didn’t really have much of a positive effect.

Do any other more experienced developers have suggestions for alternative ways that I could approach this, or else modify my existing design?