Spline mesh and loops

It’s a bit of a hack job, but I was able to get loops acting correctly with a bit of math.

From the Get World Direction at Distance Along Spline node, simply Rotate Vector Around Axis. In my case (building a road along a spline), I rotated -90 degrees along the Y axis, then set the resulting value as the Up Dir for the Spline Mesh before doing any other calculations. This ensures that the up vector for any spline mesh along this spline is basically its “normal”.

Here’s a picture of my sloppy blueprint code. The essentials are highlighted.

And here are a few pictures of the track in the editor. The red lines are debug draws of the up vectors for each spline mesh (with a length of 200).

Hope this helps!

1 Like