Spline mesh component flips upon sharp(?) angles

I have a plane mesh that is being laid out along the spline. The problem is that under certain circumstances the spline mesh just flips causing it to disappear.

250969-slpine-straight-flip.gif

250970-2018-08-19-20-08-20-window.png

250971-slpine-flip.gif

I tried to play around with up vector but didn’t help.
Couldn’t find anything in the internet. Can’t believe nobody had such a behavior.
I must be doing something wrong.

I’m trying to find the solution but had no luck so far. I thought if I replaced plane mesh with cylinder it would at least display something reasonable but it squeezes it all along the spline.

251087-ue4-spline.png

this is almost straight spline with some random deviation along x axis.
Please tell me what’s wrong here, because I’m stuck. This spline is just unusable.

solved the problem. I just played around with SetSplineUpDir method and it worked!

well turned out not quite. I works much better now.
But I can figure out how to make is looping. Is it technically possible?
Up vectors are correct but I can’t get rid of this twisting.

251545-2018-08-25-17-24-37-window.png

251546-2018-08-25-17-04-15-window.png