Spline mesh component does not quite match Spline component's curve

Hi, I’m using a blueprint with a spline and spline mesh component to create a coaster track. Sadly it appears the spline and the spline mesh do not quite match up as you can see in below image:

The red track and yellow beam are the spline mesh component, the white debug lines show the spline itself matching up to the track width and the orange pieces in the centre are static meshes.
The static meshes match up to the spline perfectly by getting transform at distance along spline. The spline mesh does not. I assume this is due to how it interpolates between the spline mesh start and end.

Is there any way to make the spline mesh and the repeating static meshes match up? Either by mimicking the spline mesh rotation in the static meshes or by making the spline mesh follow the spline more closely?

Thank you.

Hello Larcer. Have you found a solution to solve this problem? If so, can you share it?

I’ve just investigated the issue myself. For my case, the issue was that the Roll property of a SplineComponent is not linearly calculated, but the roll of a SplineMeshComponent is. That is, unless you have Smooth interp roll scale enabled on the SplineMeshComponent - but enabling that does not mean it will match the spline component’s roll.

I haven’t found a way to make the mesh match the spline exactly in its roll. It may not be possible without custom code, but would love to learn more.

For my purposes I needed to place actors flush on the mesh procedurally, so I needed to know exactly where the ‘floor’ of the mesh was (without collision tracing). In the end I did this by overriding the value of the roll provided by Get Roll At Spline Input Key (or the Roll (X) value of a rotation retrieved with ‘get transform’ or other) with a linearly interpolated value from the start of the spline segment to the end. Ie Lerp(RollAtPoint0, RollAtPoint1, local input key).