How to control the movement of the firs person with a spline

hello good day, a question, where can I find information on how to configure the firts person to follow a spline? … what happens is that I need the first person handled by the player to arrive at a place and execute a menu, with options and when choosing an option, leave the menu and be controlled by the spline to direct it through a route specify and at the end of the tour the control returns to the player.

Here is a tutorial I made for this:

I can show you how to get your player character to follow a spline. As for alternating control between spline and player input you would have to add some additional logic but this should be a good start. So let me explain the variables so it makes more sense.

  1. You need a reference to your spline BP you laid out in your level
  2. You need a reference to the actor you want to move (ie. player character/self/mesh)
  3. Drag off the spline BP reference to get a reference to the spline component
  4. Now from here you are going to basically set a “speed” that you want the character to move along the spline (try values in the thousands)
  5. You multiply this by the amount of elapsed game time, so if 1 second has gone by and the player moves 5000 units per second this will set the location of the player to +5000 units along the spline, after 2 seconds it will be 10,0000 units and the player will update location accordingly
  6. Run this off a tick or in my case I used a timeline
  7. Finally, don’t forget to “set” your distance variable (the one that remembers how far along the spline you are) so that you can continuously add to it each tick

Hopefully this will give you a good starting point to build the rest of your logic from.