Spline Camera Tutorial

Hey Everyone,

I ended up creating a spline camera tutorial, a system that has a camera follow along behind the player on a spline. I did a similar system in UDK with unreal script and wanted to update it to blueprint.

Here is what it looks like:

And here is the tutorial:

http://gregmladucky.com/blog/?p=445

You can also use the Get Best Distance Function I show there to find the closest point on a spline to any actor. I use it there to find the closest one to the player character so the camera can move to the right location along the spline.

The system isn’t fully featured so if people want me to expand it more and another tutorial let me know.

Hopefully you all enjoy!

I like your recursion method, which strictly should be faster than bruteforcing… But be aware that UE4 has a C+±level node for calculating the minimum of a float array. I do a similar system for my grind rail splines and I simply subtract the location of all spline points from the actor position and get the resulting distance, add it to an array, and grab the minimum to find the nearest point index. It’s mathematically slower than recursion BUT since it spends less time in the blueprint-C++ interop layer doing conditional checks, you may find it’s faster to bruteforce it.

Just in case you cared.

With this method would you be stuck moving toward the spline points themselves or would you be able to get a good location between points?

You do bring up a good point in which I should probably do some testing to see how fast this version is compared to others.