I cannot find a way to reverse the sequence of points comprising a spline.
I have one spline that a vehicle follows to get from A to B, using a timeline. I copied that spline for the return journey and moved some of the points around as the vehicle needs to follow a slightly different path on the way back (i.e. going around the parking area and going on the order side of the road).
The problem is that when the return journey begins, the vehicle jumps across the map to start at the wrong end of the spline. Changing the timeline to go from 1 to 0 instead of 0 to 1 makes the vehicle start at the right end but makes it go backward.
I canât for the life of me find any way to change the order of the points. In Cinema 4D where I created the spline (and then painstakingly copied and pasted the point positions and tangents to a spline component as thereâs no sensible way to import a spline to UE4), you just right click and pick âreverse sequenceâ. Simple.
Am I going to have to start a new spline component and tediously copy and paste all the point positions and tangents, but in reverse order? There are a number of different routes, each with their own return journey. Itâs going to be hideous to have to do this for all of them.
You can have one spline which is the user spline that you modify in the viewport (or construct from data).
In the BP logic you would simply add new spline component(s), this could also be dynamic if you need n splines.
Think about putting in an integer variable: âReverseAnimationAtSplinePointâ. What it actually does is creates two splines from your editor spline and meets at the same point, one reversed.
Thanks for the suggestion. However, writing the code to create a new spline isnât any less tedious than manually creating the spline. Iâd still spend the same amount of time typing in coordinate values.
The issue sounds like itâs coming from your workflow, not the tools. If you can import the points/scene in the first place (automatically) then you can create a reusable function that reverses a spline easily enough in the editor or at runtime. Let me know if you want me to go through this with you
The spline wasnât imported, I drew it in the editor. I then copied it and moved the points slightly as the return journey is a slightly different shape.
If I programmatically create the new spline by copying the first Iâd need to type all the new coordinates of the points into that code, which gives me nothing I donât already have to do to manually to create a new spline in reverse order in the editor (otherwise where would the new pointsâ locations come from?).
If itâs possible to reverse the points in the editor - even if I have to write some code to do it - so that I can then move the points manually to give the return path that would be useful.