I have a strange problem regarding the rendering of spline meshes, and I’m not sure if it’s a bug or if I’m doing something wrong.
I get the flickering problem illustrated in the following GIF when trying to place/move a spline mesh component with predefined spline points (ie. add spline point in construction script). The problem does not occur with dynamically generated spline meshes (ie. add spline point by right clicking in editor) - only those with predefined spline points.
The mesh remains in its final state when it it stopped moving, and remains that way even when playing.
I thought this may be a problem with z-buffer fighting, but there isn’t anything to overlap with and there are no materials besides the base material (part of Starter Content).
The strange part is, I have another part of the project which uses spline meshes to generate arcs - and those render fine, even though those meshes also use spline points generated in the Construction Script.
Any help would be much appreciated.
Material: M_Basic_Wall (part of Starter Content)
Mesh: Shape_Pipe (part of Starter Content)
This looks like your spline is going straight up and maybe you are having an issue with gimbal lock. Have you tried with your spline points not going straight up?
Construction script - don’t know if this is helpful. This is a test-case blueprint I’ve made, but the actual one is exactly the same except that the position inputs for Add Spline Point are from elsewhere.
Well, technically gimbal-lock isn’t the right word. What is going on here, is that spline meshes have their starts and ends set from locations and tangents on a spline. A tangent is just a vector pointing in a direction, it isn’t a complete rotation, it can only represent pitch and yaw, but not roll. When completely vertical, the pitch is 90 degrees and this means that the yaw can be anything while still satisfying the heading. I believe this is a big chunk of what you are experiencing.