Spline Mesh Component gimbal issue

I have been trying to get spline mesh component to turn without the gimbal lock for weeks. This is currently my second attempt at this, with the first about 6 months ago. I couldnt get the exact math in calculating the spline up dir which i think should be the crucial component in getting this to work.

This is what i have found out for a mobius type spline :
all upright land based spline set as z = 1;
all upside down based spline set as z = -1;
anything in between (like those with the tendency to twist at those areas) set xy to the direction with z = 0 or something low.

But they dont really matched up nicely!

Can someone spare me the agony and tell me the exact math behind this or am i just barking on the wrong tree? Got a feeling i might have to implement my own mesh component.

Hi pickersZ, did you ever find a solution to this? I am now in the excact same situation. I can’t figure out the math behind this. My splinepoints are all in local space and i generate them as part of a construction script for some procedural trees, but trying to grab the upvector from the transform, doesn’t give me the right behavior. I guess i need also to figure out the roll, which is another issue i can’t figure out yet. I hope someone in here can tell us how to do this? Even though i realize this is in the c++ section, i try to do this in BP, the solution (math) is the same.

Sadly no. I have diverted my learning focus towards to procedural mesh (runtime mesh) and hopefully i can use that in conjunction with spline component. Spline mesh component has been a voodoo to me and i am no witch doctor. :frowning:

Ok thanks anyway. I’ll keep trying and update this thread in case i figure out a solution.

Are you using standard rotators? Perhaps Quarternions could be used to solve this issue.

Well, technically i don’t have any rotations right now, just a bunch of vectorpoints to define the spline. The problem right now, is that i don’t understand how im supposed to calculate the roll, and setting an Up Dir according to a constructed Up Vector creates other problems like gaps in the spline meshes. I will be able to post a video showing the issue when im home.