When I try to add point at index, it only accepts an integer?? I want to add several points to an existing spline inbetween other existing points. Is this possible?
Think of the spline points as if it was an array. The Add Spline Point at Index node will actually insert them:
Above: before; below: after:
In the above example, original points [2,3,4] became [5,6,7] making space for the new ones inserted by the loop.
Thanks, great explanation and images, I figured it was like an array, I should have looked up how UE handles adding indexes to an array. Although, I think I am going to have a headache trying to do what I want…
I am trying to create a spine mesh using a spline, but say my original spline only has 3 points, I calculated the number of spline meshes I want along the 3 point spline by:
If (SplineLength / MeshLength) < (MeshLength*1.5) then SplineMeshCount = truncate(SplineLength / MeshLength)
else
SplineMeshCount = truncate(SplineLength / MeshLength) + 1
SplineMeshLength = (SplineLength / SplineMeshCount)
I then, want to add points at every position along the original 3 point spline according to SplineMeshLength (I copied the original spline to create a “working spline” to add the points to so I could keep original spline in tact) and then remove any original points if they do not happen to fall at a correct position.
The problem I run into now, is that every time I add a point, the index of the original points is going to change. And I cannot remove the points until the end of adding all the points in order to keep the original shape of the spline (I’m hoping this would work anyways)
I realize I could, and will probably have to, write some convoluted script to track my original points ad increase each points index if they come after the point being added, Then add 1 to the index of each point being added for each original point passed? Is my thinking on track here?
Thanks again for your great answer.
This is all in Blueprints and C++ is not an option, this is a blueprint only project.