How can I loop Spline Component?

I’m making a racing prototype, where vehicles follow the spline component like the train on rails.

By “looping” I mean seamlessly merge first and last points. I was hoping to see something like “Loop spline” checkbox in component settings, so the spline wouldn’t have any gap between first and last points.

The only solution I came up with should work in theory but fails. In Construction script, I’m using Set World Location at Spline Point to set the last point’s position to be the same as the first. In effect, the last point never snaps to the right location and moving it around feels like it isn’t under my control.

1 Like

+1. Can’t believe there’s not a closed loop checkbox. If you find a solution, do post it here.

I’ve not tried this but, in the editor select the first point and then Ctrl + Click the end point.

CTRL + Clicking first an last does nothing. I tried CTRL+clicking any point of my spline with no effect.

Running into the same issue here. Set World Location seems to be setting its local location instead.

Hi, this is now implemented and will make it into 4.6. If you can’t wait that long, it’s also on Github here. The Set World Location bug has also recently been fixed :slight_smile:

Very cool. All of my thanks to you, good sir.

I’m trying to build from your commit, but I get bunch of errors and “Failed to load OculusRift plugin because there’s not Oculus module” when I try to run U4Editor. I don’t have Oculus. Got any idea what I could be doing wrong?

Anyway, thanks for taking your time to add this feature. Hopefully we’ll be able to see it in official release :smiley:

Hello. Unfortunately, it looks like the github link is broken, any idea on how to find info on this? I’m trying to automatically connect spline points for streamed levels.

Same here! I need to merge different spline components by tip distance