I have a spline, with a spline mesh (image A for blueprints) but whenever I try to make it to go over itself in the editor (image B) it twists itself at one point (Image C).
How can I make it to not do that? I don’t want the spline mesh to rotate in any way based on the spline it’s on.
That’s a common issue. You can sometimes fix it by slightly changing UpDirection by using [Set Spline Up Dir] node in Construction, but with longer splines it usually just shifts the problem to some place else; maybe not with a 180 or 360 degrees twist, but it still distorts the mesh.
AFAIC, there’s no blueprint native way to completely fix this thing. There are some paid plugins that fix that, though.
I guess the issue is that blueprints don’t use quaternions for rotation, only Euler angles, so when your spline bend by 180+ degrees on one axis, this tends to happen.
Thank you!
Using GetTangentAtSplinePoint solved half of the issues caused by GetTangetAtDistanceAlongSpline (I didn’t expect it to cause this kind of issue, but in the end it’s better because I optimized the code a lot), the other half was caused by the mesh edges “marked as sharp” in Blender.