Im trying to figure out how to avoid occasional splinemesh twists. So from my understanding we have to set Up Dir (which is for the start), and then calculate the roll. The formular as far as i can figure out, should be something like getting an angle between the start and end point in the spline, and since the spline itself don’t have a rotation, im trying to use construct an upvector from the tangent of each point.
This should give me two vectors to work from which i can then crossproduct to get the orthogonal vector. The dot product between should in theory give me the angle that i need, but setting the Up Dir causes it to make some big holes in the spline.
Did anyone figure this out properly? And by that, i mean not just so that it works most of the time, but always.
See an extreme example along with the blueprint setup i have right now producing this horrible result.
As a side note: If i don’t touch the Up Dir and leave the Roll at zero, it looks just fine, in 90% of the cases, but eventually i get twists along my spline. Also since this is procedurally generated, i can’t assume any fixed Up Dir, since it will change through out the spline randomly.