# Help with spline

**URL:** <https://forums.unrealengine.com/t/help-with-spline/547583>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 3, 2022, 12:02pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583 "2022-05-03T12:02:07Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [May 3, 2022, 12:02pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/1 "2022-05-03T12:02:07Z")

</div>

Hi,

So i am testing with spline, and i cant seem to get it to work correctly.  
What i am trying to do is make a spline mesh along a location of an array, i know how to set the spline location but i can’t seem to get the rotation right. Its a simple spline without any curve so its linear

If you take a look at the picture, you can see orange point wich are where my spline points will go, and the red line is the mesh it self

 ![Spline](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/6/766326d47d65cfeece5b2c5e7e8888b96376214b.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 3, 2022, 12:10pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/2 "2022-05-03T12:10:27Z")

</div>

> [@FlinnNew](#):
>
> but i can’t seem to get the rotation right

No need to set rotation, at least not for this. Also, no red line.

This should be enough:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/1/3a17c7497a055f35ed2dfbf7424f2fcac560682c.png)

What end result are you seeing on your end, what’s _not right_ about it? Normally you’d read a tangent (and location) off the spline and apply it to the mesh:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/6/976ea163aa2d4fb03e10cd9cdef6539294a3f374.png)

The 2 bottom nodes would give you more control, for when you need something more uncanny.

---

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [May 3, 2022, 2:11pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/3 "2022-05-03T14:11:10Z")

</div>

This happens when using the methods. In the 2nd image, you can see the green circle where the mesh is collidion as well as missing the left corner at image 1

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/6/ef60dd46defd4d77e949939817122b93a4acf2d5.jpeg)  
 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/b/beb40a9273e44d7b78daf8dce21a250e517e94c2.png)

---

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [May 3, 2022, 2:23pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/4 "2022-05-03T14:23:45Z")

</div>

Sorry for the bad art haha, but…  
The red cricles are the pints location and the green is the mesh that gets created. Now if you take a close look at the image, you can see how the mesh gets creates based on the spline points and locations. I want to archive that but not sure how. I’ve even tried wathcing videos on yt about the spline system but can’t seem to undestand…

 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/d/31d53ac9f1a1a78d2470a570fef6aec221139f78.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 3, 2022, 2:44pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/5 "2022-05-03T14:44:22Z")

</div>

You want to use 4 points but in the example with the meshes there seem to be 3 only. Could you show how you’re applying spline data to those spline mesh components?

---

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [May 3, 2022, 2:54pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/6 "2022-05-03T14:54:15Z")

</div>

Oh yea sorry about that, i was explaining on what i was trying to archive but same goes for 3 or 4 points 🙂

I might be doing something completely wrong, please let me know.  
Here is the code. When using the +1 for next index is even giving me a wierd mesh form. Let me know if you want a picture for that as well

 ![bp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/c/eaca6aa29d1dd67c593740175700c27dbd7fb8ea.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 3, 2022, 3:00pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/7 "2022-05-03T15:00:12Z")

</div>

If this is the desired result, it can be simplified to:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/d/91d9ba830306abcd9752fc32134b45319eaea1fd.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/4/504e59469e5cec29af12a9b204d28be645cd0b46.jpeg)

---

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [May 3, 2022, 3:05pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/8 "2022-05-03T15:05:48Z")

</div>

Yes, but what am my doing wrong? i dont get the same result?

 ![spline2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/b/68b97cd1d1956a5df777d78a51d2934258419d1e.png)  
 ![spline1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/6/7361283e143f277f8a2f01718ab9e3b9ec6a50e8.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 3, 2022, 3:07pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/9 "2022-05-03T15:07:14Z")

</div>

Did you fiddle with the rotation of spline points? Looks like the points are twisted.

---

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [May 3, 2022, 3:08pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/10 "2022-05-03T15:08:56Z")

</div>

No points are twisted, even tried to make a new sample project but same result.  
Any chance that you might send over the UE Project? 🙂

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 3, 2022, 3:16pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/11 "2022-05-03T15:16:59Z")

</div>

sure, but you’ll be disappointed, me thinks:

> **[MyProject46.zip](https://drive.google.com/file/d/1g_OdhTI43MWuMX6GDLonDoP99LibP9Z0/view?usp=sharing)**
>
> Google Drive file.

hope it’s the right file this time round ;p

---

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [May 3, 2022, 3:32pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/12 "2022-05-03T15:32:37Z")

</div>

Mhh yea you right haha, it didn’t worked as expected.

New question then or atleast a follow up. Is there a way to make so the spline draws the path from point to point, so lets say i have a mesh from point 0 to 1 and if i have 2 to 3 those to (2 and 3) wouldn’t effect the mesh in 0 and 1

With other word, to draw the path from point to point and make it work with a rotation max 90 Degree so it doesn’t clip over the mesh

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 3, 2022, 3:44pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/13 "2022-05-03T15:44:03Z")

</div>

Sounds like you’d want to create a procedural mesh for this.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 3, 2022, 3:44pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/14 "2022-05-03T15:44:57Z")

</div>

> [@FlinnNew](#):
>
> Mhh yea you right haha, it didn’t worked as expected.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/8/0381689b0bc29380d9946a5bed5673d3a88121e2.png)

We’ve achieved this. Wasn’t this the goal?

---

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [May 3, 2022, 4:40pm UTC](https://forums.unrealengine.com/t/help-with-spline/547583/15 "2022-05-03T16:40:50Z")

</div>

The goal is that, but as mentioned above there was some few things along the way to make the spline like i wanted it to be, but that still doesn’t heppen with the current bp.

I was hopeing to avoid procedural mesh, i though maybe spline could do the job?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 5, 2022, 8:16am UTC](https://forums.unrealengine.com/t/help-with-spline/547583/16 "2022-05-05T08:16:26Z")

</div>

> The goal is that, but as mentioned above there was some few things along the way to make the spline like i wanted it to be, but that still doesn’t heppen with the current bp.

It’s somewhat hard to understand what you need and what is not working. Perhaps this might help:

> [@Why does the inflection point bend when Spline sets the point type to linear style?](https://forums.unrealengine.com/t/why-does-the-inflection-point-bend-when-spline-sets-the-point-type-to-linear-style/541944/6):
>
> Play with the leave tangents until you get the desired result: Not sure how your mesh is set up, this is just a minimalistic editor cube:
