Hey all, I'm facing a "beginner" type of issue, but I couldn't find a proper solution to it. I'm building a train game, and basically, I move it along a spline. The spline is built from real world French railway open Data, that I convert into a spline in Unreal.
The issue, as you might have guessed it already, is that because of the shape of the line, segments don't have the same size, with smaller segments in curved areas. This introduces a speed issue where the train will move "slower" (despite having the same speed) when nearing a spline point, and then immediately get back to the expected speed.
I've been trying to solve this issue, and I stumbled upon some reddits here and there but I can't really get my head around it. One thing I have tried was to resample the line to have a point every x meters, but this introduces Bezier wobbliness along the x/y axis which is not wanted. I also tried to resample the line at a 1 meter linear to avoid the Bezier issue, but then it feels like the game is laggy because of all the non smooth increments.
I have included the part of the blueprint where I update the train position on the spline, and a short section of said spline so you can see the point distribution issue. (the full spline in 22kms long).
I have been scratching my head for a week wondering what I'm doing wrong, and I'd love some help figuring that out if this rings any bells π