I Would like to have my player (from the flying template) flying through a tube. The tube has curves and twists and the forward movement of the player should basicly follow a"path"in the middle of the tube corridor. Ideally the player should rotate back to the path in center of the the tube if the offset from it gets to big, like what modern cars are doing if you leave your lane, but in 3D. Unfortunately i doesn’t have any idea how to start? Dose anybody know how i could do this with blueprint?
One idea for the player movement is to have an empty/dummy object that does the path following and then have your player as a child of this object which is free to move in relation to the parent object. I had something similar implemented in blueprints.
With regards to limiting movement off the path, you’d probably want to have a value that you check against and then use something like VInterpTo to bring the player back onto the path.
Here’s a basic skeleton of what I suggested. Hopefully it’ll give you a start.
You’ll need to open the Corridor_Test map manually in the Unreal Editor as there’s no game mode to load defaults etc. Use WASD to move the player within the camera view, although the movement is far from perfect and doesn’t include your idea of returning to the path.
Everything else should be fairly clear if you’ve looked at the link in my previous reply.