Spline tool with random static meshes with varying sizes

Hi there,

I’ve been following this awesome tutorial from DokipenTech ( on how to use spline tool to place static mesh that follows along the spline. It’s great for one static mesh but in my game the “roads/path” that I’m building are not the all from the same mesh as it’s a little more organic/messy.

Currently the way Dokipen has it set up is that the spline length is divided equally with an exposed variable float that you can manually type in and the static meshes that are on the spline are divided equally on the spline.

I’m wondering if there’s any way to have the spline tool to automatically calculate the unit of the random static mesh (depending on the axis, in my case, in Y axis) and have it spaced correctly one after another diffrent randomly selected static mesh instead of just dividing the spline with the float value equally to prevent overlapping meshes . I’ve attached 2 images to explain what I mean, one is a blueprint I modified from what I’ve learnt from dokipen (to select random meshes) and another is the current visual placement of the static meshes along the spline currently.

As you can see from the image I have narrow ledges mix with long ones and medium sized one.

Any help will be greatly appreciated! Thank you!