Hi, I have a mesh replicated along a path, and I don’t know why it twist in certain points of the spline in this way:
How can I solve it? i’m struggling with this
Hi, I have a mesh replicated along a path, and I don’t know why it twist in certain points of the spline in this way:
This is a known issue that is related to the splines up vector. Maybe this post will help to get your splines fixed.
Some time ago I did some testing with this plugin from the Marketplace. It comes with a price tag and is working only up to 4.23, so I don’t recommend to use it for any commercial project.
Don’t know why the developers left their plugin, maybe it’s easier now to get this spline issue fixed. The source code however is available on Github and after some changes I managed it to get it compiled to work with UE5.3.2.
Hey all, a little late to the party but I came up with my own solution in case anyone finds it useful:
What I did was create a map of integers and vectors that maps spline Input Keys to Up Vectors. For each Spline Mesh, I get the Input Key for the center of the mesh (average of A and B inputs) and see if an entry exists in the map for the Input Keys before and after that point. If so, I lerp between the Up Vectors for those keys and set that as the up vector for the mesh. If not, I set it to the default value.
The nice thing is you only need to set the values for the spline points that are giving you trouble – for example, my spline has 16 points but the problem only starts on point 14. The downside is you need to keep setting the values even if they’re all the same (again, points 14, 15, and 16 all have the same up vector, but I need to create a separate entry for each of them in the map. I’m calling this good enough for now, but one potential improvement would be to set Up Vector change points, i.e. lerp between points 13 and 14, then maintain that value for 15 and 16.