Hdubs37
(Hdubs37)
September 4, 2025, 8:30pm
1
Hello guys.
So, I’ve been blocked trying for days to solve this issue, can’t find a way…
I’m having a spline, with mesh along spline ( creating a pipe)
For some reason, I have some really weird twist eather at the first or at the last mesh, or at both.
Here is how I set up the up dir on the mesh component (in the for loop based on spline index position)
For the start, it’s OK on the right :
But twisting on the left :
And the end do weird stuff too passed a certain angle :
The spline looks like :
I’ve tried so much stuff, adding a 90 rotation to the tangant, applying up dir based on angle beetwen start and end etc, but nothing works.
I would really appreciate any help. Thank you
Nawrot
(Nawrot)
September 4, 2025, 10:27pm
2
Are faces of that mesh facing outside? To me looks like either scale is negative, or mesh has flipped faces.
also try same mesh with PCG and spline mesh spawner (there is some simple tut about that).
VIDEO
Dasay2605
(Dasay2605)
September 5, 2025, 12:18pm
3
Hi. Can you show all the logic you used to create the pipe?
Hdubs37
(Hdubs37)
September 5, 2025, 1:59pm
4
Here is how I create it :
What’s even stranger is that, I’ve find this way of setting the up dir. It’s working perfectly while my spline stay in its initial rotation. But if I rotate it, it’s messing again :
I can’t figure out how I’m supposed to set up this UP DIR
I tried changing in the rotate vector the 90;0;0 with the rotation of the first spline point (0) but it’s doing some other strange twist
Dasay2605
(Dasay2605)
September 5, 2025, 2:24pm
5
What is the point of using “Set Spline Up Dir” at all? If you remove this node, shouldn’t everything work fine without it?
Hdubs37
(Hdubs37)
September 5, 2025, 2:28pm
6
No if I don’t set it, it’s doing still weird stuff depending of the rotation of my initial start of spline, and the angle with the end.
I know for sure that this UPDIR is the cause of my issue. Look, I’ve set it a variable :
This updir has to have a value to set things correctly, but it depend of the angle and rotation and can’t figure out how to calculate it
Dasay2605
(Dasay2605)
September 5, 2025, 2:31pm
7
I see now. I think I had a similar problem when I created a “spline mesh” using the procedural mesh component
. I was able to find a solution there. I’ll see if my solution applies to the spline mesh component as well.
1 Like
Dasay2605
(Dasay2605)
September 5, 2025, 6:39pm
8
Unfortunately, my algorithm doesn’t work with spline meshes. I guess you can then try something like this:
But I don’t think it will work.