I am working on an FPS game featuring a train and have encountered issues with the splines. After searching the forums, I found that the issue lies with the spacing of the spline points. When the spline points are evenly spaced, my train wagons work almost perfectly, although there are still minor issues but they are basically invisible. However, when the spline points have different spacings, the wagons fail to maintain a consistent spacing while traveling along the spline.
The not evenly spaced Spline:
The evenly spaced Spline:
How the wagon moves along the not evenly spaced Spline:
The Blueprint(Basically i set the train transform in the desired Distance, and then i subtract the TrainSize of the Distance, and set the Wagon Transform, further i replicate it to have more wagons, but that doesnt matter):
And yeah, I could use spline generation, but I intend to use this train on an uneven landscape… So I see two good solutions that I don’t know exactly how to do:
- A way of procedurally generating the splines points so that it is evenly spaced and still folow the general intended shape.
- A different way to get the distance of the spline, so that this doesn’t happen.