I am making a tool for myself to easily make a line of SplineMeshComponents along a spline in order to save myself some time when constructing complicated sequences (such as a long strip of rails, or a long sequence of piping.)
I have the ability to scale the mesh in both the width and height of the object (controlled by the spline startscale endscale values) but I cannot seem to figure out how to provide the ability to ‘flip’ the mesh so that its forward direction is flipped in the inverse direction.
Here’s an example of what the mesh looks like normally looping along a spline:
That looks fine, but I want to provide the fuctionality to flip individual segments of the spline so that the the mesh is pointing the other way. I thought the solution would be as simple as swapping the EndPosition and EndTangent with the StartPosition and StartTangent but that provides the following result:
The tricky part is that this is actually exactly what I would like, but the normals are pointing in the wrong direction. In most 3d tools, this happens when you scale a model the wrong way and never bother to recalculate normals. I looked high and low to see if I could modify the normal direction of the individual asset but I could not find such a feature in blueprint callable code.
I’m downloading the latest version of UE4 now to see if any of the tools there will help me with recalculating the normals (specifically going to look at the UpdateMesh function) but, in case that doesn’t work, does anyone know how I could solve this issue?