Need help with spline question

I will get right to it

The yellow spline is my original, also called the first spline
The blue spline is the 2nd i want to change so it maches the yellow one

What i am looking for is how to get so that the blue spline matches the yellow spline even if the spline locations for the blue spline is changed along the first spline

As you can see on the image the blue spline has its spline location 0 the same as the yellow spline location 0 & the blue spline location 1 is somewhere at a given distance along the yellow spline, we can say the half of the spline 1 location. And then i tried to match the blue spline tangents for spline point 0 & 1 but i can’t seem to get it right. It doesn’t match the original spline…

Importan to know, my blue spline has its spline points 0 & 1 always set along the yellow spline, so lets say my yellow spline has a length of 1500, then my blue spline has its spline point 0 set along the first spline at distance 200, then my blue spline again has its point 1 set along the yellow spline lets say its distance 800 (just an example)

Also look at the 2nd image for how i set the spline mesh (the mesh has more segment so it curves well)

I have a workaround: use the same amount of spline points for each spline, and the exact same shape…but end the meshes on the blue spline early, so that the mesh path will be exactly the same except shorter.

Was this what you were attempting to do physically? Or am I wrong?

Regarding your other posts, something like this comes to mind:

Now… if you want to fix a segment, then you might need to iterate through all the points and match those that are closest within a radius:
Imgur


Result:
SplineMatch


You can set custom events to be run in the editor by ticking the CallInEditor checkbox:

But I warn you… this is permanent, meaning you will not be able to undo this so work with a copy.


Idk if there is another way to do this. Would be cool if more experienced pitched in.

1 Like

Hi, that is what im trying to do but can’t get the tangent right so the curve is the same just like the picture shows. Perhaps you know more? :slight_smile:

Another option is to move points to closest location of the other spline.

SplineMeshMatchClosestLocation


If this does not help then guess I’m having trouble understanding your issue… :sweat: