SplineMesh offset (Pic to describe better)

Sorry if I am explaining too much and not very clearly, I am recovering from a brain injury.

I am spawning 2 spllineMesh along a spline, I am setting the start and end tangents with the code below. In the pic you can see the yellow dots, they have offset on the location which works well too as you can see the blue mesh is offset from the spline. Them yellow dots under the blue mesh is where the blue mesh should be, but because I’m setting the end tangent directly from the spline which is in the middle - wont work due to the offset.

I basically need to change the end tangent so the blue mesh matches the offset like the yellow dots. I have tried so so many ways but I’m running out of ideas to try to make it work.

If you can help that would be amazing, thanks!

							FVector StartTangent = splineComponent->GetTangentAtSplinePoint(curLoopIdx, ESplineCoordinateSpace::World);
							FVector EndTangent = splineComponent->GetTangentAtSplinePoint(nextLoopIdx, ESplineCoordinateSpace::World);

I had a similar problem e few days ago and made a workable solution for this maby it helps you to.

For the middle spline i would get the right vector at start and end.
Then use these to offset a new spline with the same point locations as the first spline to the left or right by multiplying.

After that set the arrive and leave tangents from the middle spline to the newly made spline.

Then set the spline mesh on the newly generated spline.

Thank you so much

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.