USplineComponent::GetInputKeyAtDistanceAlongSpline is wrong

Hey ,

To begin, thank you for submitting a bug report, however at this time we believe that the issue you are describing is not actually a bug with the Unreal Engine, and so we are not able to take any further action on this.

Secondly, I understand that the function name is a bit confusing given that the normal representation of a InputKey in the Viewport is a whole value, such as 1.0, 2.0, or 3.0. What this function is designed to do is give you a InputKey that is based on the start and end point of the Spline, based on the Duration of the spline. This still constitutes a InputKey, it just doesn’t directly follow the same structure as the visual appearance of them. It instead uses a 0.0 to 1.0 scale as it is only using the start and end points to do the calculation.

It appears that you have a good understanding of what is going on and have a work around that will suit your project well. If you would like to update the function and put a pull request, you can do so by visiting the Epic GitHub starting page, here:

[][1]

[1]: