Using 4.18.1 I have found a very specific case where spline meshes appear to be failing when it has two points aligned on the z axis. First, let me detail what I was trying to achieve:
Create a new blueprint blank project with starter content
New default level
Create a new Actor blueprint
Add a scene to replace default root
Add a spline component
In the construction script (this also applies to the normal event graph as well), create the graph as shown in the following image:
In the Add Spline Mesh Component, select the mesh SM_PillarFrame, and the forward axis as Z, then compile. In the viewport, you should see the mesh aligned along the x-axis as expected. Now translate key 1 of the spline to position [0, 0, 100] and the mesh will become hidden.
If you translate x or y even fractionally away from [0,0] (say, [0,0.00001] then the mesh will reappear.
Now more fundamentally, the issue appears to be just the spline mesh and there is no relation to the spline itself. The construction diagram can be reduced to just the Add Spline Mesh Component, and Set Start and End. Set the Start Pos at [0,0,0], Start Tangent [0,0,0], End Pos [0,0,100], and End Tangent [0,0,0]. Again the mesh will disappear. For more reasonable tangents, you can use [0,0,10], and [0,0,10], but again no change. If one of the tangents is set to a non-aligned axis, say [0,1,10], then again the mesh will appear.
I was able to reproduce this behavior so I’ve created JIRA UE-52947. Our developers will be investigating further. Follow that link to monitor the status of the issue on our Public Tracker.
In the meantime, the workaround would be to use the offset that is like you described above (0.00001).
I’ve dug so deep into this issue before and I’m still yet to find a solution, I will however elaborate on what I’ve found. And another solution if needed.
It’s basically a gimble locking issue and it occurs when the spline forward axis at a certain point is equal the the direction the spline is going. What I normally do to tack this problem, is to always build the spline on the X axis, then just rotate the actor instead (or whatever you parent you spline to) to get the desired orientation.
Obviously that doesn’t fit the bill for all cases, but if what you are making doesn’t need to move it’s much easier to build complex shapes that way.
Interesting. I tried this once before too, I basically interpolated the up vector, rotations, and tangents of each spline point between each other (For the rollercoaster). It would prevent gimble but it would twist the spline mesh’s I had attached between the spline points.?
Are you programmatically assigning them? Or are you explicitly just setting the up vectors on the points from the editor and calling it a day?
I’m setting each point up vector using blueprint .
My issue was a ivy tool that when it travel perfect straight up, some times disappear or have tons of twist, even if all is set up correctly (tangent and all).
I did the test creating a spline that go straight up only in Z and had same issue , crazy twist making some point disappear.
All fixed after I set each up point vector pointing to the up vector of the current point (local) , there was a node for that (set dir up)