# Spline Mesh - Fix mesh scaling?

**URL:** <https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [March 11, 2018, 2:23am UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718 "2018-03-11T02:23:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![TorQueMoD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/torquemod/32/710746_2.png) [@TorQueMoD](https://forums.unrealengine.com/u/TorQueMoD)\
**Post date:** [March 11, 2018, 2:23am UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/1 "2018-03-11T02:23:52Z")

</div>

I’m trying to use construction script to place a train track along a spline but I’ve noticed that if there’s uneven distance between two spline points, it either squashes or stretches the mesh and it looks terrible. I was wondering if there’s a way to fix this so the mesh will be the correct scale regardless of the number of points.

[![](http://torquemod.com/spine_track.jpg) ](http://torquemod.com/spine_track.jpg)

And here’s my construction script:

[![](http://torquemod.com/spline_track_constructionscript.jpg) ](http://torquemod.com/spline_track_constructionscript.jpg)

---

<div class="post-metadata">

**Author:** ![TorQueMoD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/torquemod/32/710746_2.png) [@TorQueMoD](https://forums.unrealengine.com/u/TorQueMoD)\
**Post date:** [March 12, 2018, 7:54pm UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/2 "2018-03-12T19:54:10Z")

</div>

Is there really no way to fix this issue?

---

<div class="post-metadata">

**Author:** ![Raildex](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raildex](https://forums.unrealengine.com/u/Raildex)\
**Post date:** [March 12, 2018, 10:13pm UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/3 "2018-03-12T22:13:32Z")

</div>

Well, you have to distribute your Spline Points in a uniform manner.

---

<div class="post-metadata">

**Author:** ![TorQueMoD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/torquemod/32/710746_2.png) [@TorQueMoD](https://forums.unrealengine.com/u/TorQueMoD)\
**Post date:** [March 13, 2018, 6:45am UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/4 "2018-03-13T06:45:05Z")

</div>

> [@Raildex](#):
>
> Well, you have to distribute your Spline Points in a uniform manner.

Lol. Yeah, that much I gathered. I was hoping there was a way to automate the process rather than having to do it manually. I guess there isn’t. I think what I’ll do is a combination of using this spline “extrusion” for the rails and then spacing a mesh along the spline for the slats in between the rails. Cause unless you’re literally measuring the spaces between spline points, then there’s going to be squashing and stretching regardless.

---

<div class="post-metadata">

**Author:** ![Alex\_Mees](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alex\_Mees](https://forums.unrealengine.com/u/Alex_Mees)\
**Post date:** [May 14, 2018, 2:13pm UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/5 "2018-05-14T14:13:45Z")

</div>

What I do is:

1. create the spline that you want, it doesn’t matter if it has uneven spacing. (this is the spline you can edit in world)
2. In the construction script create a second spline getting the points from the first spline at an even distance by using Get Location and Tangent at Distance along Spline. (this is the spline mesh you use to construct the tracks and will be invisible). Iterate through this points and create the spline meshes.
3. Let the mesh and distance be a variables so you can use to other stuff (like a pipeline).
4. When doing (2) change how you get the points and tangents to make different effects (like a track that always point down or that has a constant elevation).

---

<div class="post-metadata">

**Author:** ![TorQueMoD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/torquemod/32/710746_2.png) [@TorQueMoD](https://forums.unrealengine.com/u/TorQueMoD)\
**Post date:** [May 14, 2018, 5:45pm UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/6 "2018-05-14T17:45:01Z")

</div>

Oh, that’s a really neat approach Alex. Thank you for sharing your methodology!

---

<div class="post-metadata">

**Author:** ![Howlatthemoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Howlatthemoon](https://forums.unrealengine.com/u/Howlatthemoon)\
**Post date:** [October 4, 2018, 8:12am UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/7 "2018-10-04T08:12:12Z")

</div>

It’s a bit late for your problem, but maybe this can help someone else in the future…

There are nodes to get location and tangent at a distance along a spline, instead of getting them only at spline points.  
If you know the best looking lenght of your mesh, divide the total lenght of your spline by the ideal lenght of your mesh and make a for each loop on the result, with a add spline mesh node, and set start and end of these spline mesh from locations and tangents at distance along spline calculated by index (for the start) and index+1 (for the end) of the mesh multiplied by the lenght of the mesh.

The downside of this method is that at the end of the spline, your last mesh is not ending exactly at the end of your spline… You should be able to make a division a bit more complicated to obtain the exact number of mesh to fill the spline, while adapting dinamycally the lenght of the mesh… But the simple method was enough for my need.

---

<div class="post-metadata">

**Author:** ![AutumnPioneer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AutumnPioneer](https://forums.unrealengine.com/u/AutumnPioneer)\
**Post date:** [November 19, 2020, 6:37pm UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/8 "2020-11-19T18:37:30Z")

</div>

I came across this thread while looking into why my vertices are not evenly distributed within a spline mesh component and realised that the issue is relating to the tangents. This fix works with splines where several meshes are created along the spline, based on its length divided by the length of the mesh (e.g 200) units.

I have come up with a fix (which works in my case, and I would assume many other cases):  
We need to normalize the start and end tangents for each mesh and multiply that vector then by the X length of the mesh component you are using in cm (e.g 2m mesh = 200 in my case)

In my case below, the “Mesh” is just a public variable so I can change it in the scene per instance. It is also possible to get this Mesh’s bounding box size, and multiply the X value by 2 to get the length!

 ![SplineMeshTangent.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/a/2a288aa441f48281837249a0ff51b6eb951bc0f3.png)

---

<div class="post-metadata">

**Author:** ![Aethrian](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aethrian/32/1057657_2.png) [@Aethrian](https://forums.unrealengine.com/u/Aethrian)\
**Post date:** [September 25, 2025, 10:45pm UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/9 "2025-09-25T22:45:49Z")

</div>

This is amazing thank you!!! Fixed my similar issue. Here’s before and after pics for anyone interested

 ![BadSplineMesh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/a/47a2f6f4e90bfc40f61d77d5a42571313712ebe1.jpeg)

 ![GoodSplineMesh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/2/8/a288be76087455cd75dd518f0c7adb8b3708935e.jpeg)

MUCH better 🙂

---

<div class="post-metadata">

**Author:** ![jacamram](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jacamram](https://forums.unrealengine.com/u/jacamram)\
**Post date:** [September 26, 2025, 2:08am UTC](https://forums.unrealengine.com/t/spline-mesh-fix-mesh-scaling/107718/10 "2025-09-26T02:08:01Z")

</div>

Use scale override to fix mesh stretch 😀
