As the title says. I need some help making a blueprint that works like Bioshock Infinite’s Skyrail I edited some of my gameplay footage to show what I want to do with my blueprint
( Ue4 skyrailBPhelp - YouTube )
This is my base spline blueprint. Its a simple spline from a tutorial I used.
I have nothing else using it in any way possible.
It’s a fairly complex system that you’re asking about. Break the functionality into smaller pieces and work on those.
First figure out whether a modular system is needed; is it just the player or other entities that use it as well. These will be 2 fundamentally different approaches with some common elements.
spline interaction - trace (if you don’t know how to trace, that’s another must-learn thing) against the spline mesh and show / hide an interaction widget
attach / detach player to the traced location: snap at first and, eventually, see if you can work in some interpolation (linear or otherwise) as IndieGameCove suggested
spline traversal - learn about spline length and time and how to use Tick or Timeline for this & vInterpTo and its const cousin
learn about how spline tangents work and how to extract forward vector to rotate the moving entity (it will be in the video linked in IndieGameCove’s post)
is it the player that controls spline movement or the other way round - the spline moves an entity along itself
If you’re new to the engine, it’s gonna be hell of a ride
I just realised that you listed required functionality in the vid you posted. That is going to be more complicated than I mentioned above. Start small.
I am still quite new to the engine. Barely know anything about blueprint or coding tbh. I looked at a few things around from what you mentioned and I got a trace working for 1 line so far.
That looks about right! See if you can attach / detach yourself to it. You might be able to do it using AttachToComponent node - the one that has actor as a target.
Also, look into DrawDebugString and DrawDebugPoint / Sphere nodes - they will make it easier to see what’s going one - easier than Print String.
I’ve got the debug working and an attach somewhat working. Attach sends me to the start of the line but then physics kicks in. I forgot to mention it is scanning off of the spline mesh and not the actual spline itself. I don’t know if that will be an issue but here are some screens of what I have. (wasn’t able to work on it last night so this is from today)
(I am also looking into that zip line Bp as well. I’ll see if I can learn anything out of it)
So after spending multiple hours trying to figure out a system that works, I am stuck. Everything is the same as the last post here to give reference of where I am at.
you need to take the hit result and cast to the spline to reference it. then convert the impact point to distance via the function I previously posted. then use ‘get location at distance’ node to move the player by increasing the distance along the spline.
or get the direction/tangent of the spline at the nearest point and move along it could also work.
you can also use that vector to get the ‘rotation from x vector’ to turn the player.
It could be set up either way. I would probably do most of the player movement along the spline in the player bp, but that’s personal preference. You could set up an interface that tells the spline to grab the player and move it around.
Okay, so I tried following the steps you gave me and I have this for a start. Did I do this part right or did my small brain not comprehend this right.
drag a line off the “hit actor” and cast to the skyline bp then set that to your skyline ref variable.
the coordinate space will need to be set to world not local. all the spline nodes are local by default so just remember to switch them. or whatever makes more sense to you I like working in world space.
Then if you just add an arrow component and set it to the location being returned there. the rotation is just the ‘get tangent/direction at distance’ ‘rotationfromx’. Set it to visible in game and make it big enough to see.
After all that you should have the preview arrow like the one that was in the vid