Fixing twisted (procedural) Spline points?

Hello!

I’ve created a closed spline circle (Spline Component) by providing the point positions with sin/cos. But no matter what I try, I always get these twists and within the circle.

These twists also occur when creating a spline manually, but its possible to fix these by dragging and rotating the endpoints one after another…

I tried to set the Up-Vectors for each spline point through my construction script, but got some very strange results, which seem to depend on the default Up-Vector… I suppose this is somehow also related to the tangents…?

On twitter someone mentioned a fix by using quaternions, but unfortunately without providing any further details…

I hope somebody has an idea… I spent hours getting behind this… :sweat:

Thanks
Felix