Snap to nearest spline point no longer working in 5.6

In 5.6, right clicking on a spline point and using the option “Snap to nearest spline point” or pressing Shift + P on a spline point will no longer snap that point to any nearby spline and will sometimes cause the spline to snap to itself.

From looking a the github it seems NearestSplineComp was swapped out to use the spline that owns the point we want to snap to when getting the NearestWorldPos and NearestWorldTangent. Would it be safe for me to swap these values back to what they were originally while keeping the new function calls?

(See image for more detail)

I was also able to replicate this issue in a new project

Steps to Reproduce
In 5.6, right clicking on a spline point and using the option “Snap to nearest spline point” or pressing Shift + P on a spline point will no longer snap that point to any nearby spline and will sometimes cause the spline to snap to itself.

Hi,

Thank you for the report.

I created a bug report for this issue that can be tracked here if/when it’s approved for public visibility: Unreal Engine Issues and Bug Tracker (UE\-350122\).

There is no ETA as priorities for bugs and features can shift at any time.

It should be safe to try as they’re both USplineComponent*, but if snapping doesn’t work you’d most likely need to rely on the old functions as well.

According to the commit message, they are encapsulating spline component legacy spline data to move forward with a new implementation, so tracking the issue at the above link would be the safest.

Regards

Hi John, Thank you for the response. I swapped the pointers back to what they were in 5.5 without swapping the functions and that does fix the issue with “Snap to Nearest Spline Point” specifically. However. It appears “Align to Nearest Spline point” was not entirely fixed by this. The spline point does snap to the other spline, but the tangents are not adjusted as they did in 5.5. I will revert the function back to use the same functions as in 5.5 and report back with the results.

I can confirm I managed to get it to work the same way it did previously in 5.5. To fix it I had to revert both OnSnapKeyToNearestSplinePoint and SnapKeyToTransform to the version in 5.5.

Glad to hear! If you are all set I can go ahead and close this case, but if you have any follow up questions please feel free to leave them here. Thank you.