# Problem with Road Mesh Collision if used with Spline Mesh

**URL:** <https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602>\
**Category:** World Creation\
**Tags:** spline-mesh-componen, unreal-engine, Spline, question\
**Created:** [January 23, 2024, 9:03pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602 "2024-01-23T21:03:47Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![agosch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@agosch](https://forums.unrealengine.com/u/agosch)\
**Post date:** [January 23, 2024, 9:03pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/1 "2024-01-23T21:03:47Z")

</div>

Hi, i made a simple setup for a road spline in Unreal Engine 5.3. Everything works fine except for one thing. The collision of the mesh gets disabled if the spline mesh is near another surface with collision (does not matter if its a terrain or a different static mesh).  
Here are some screenshots to illustrate the problem:

 ![Screenshot 2024-01-23 215201](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/3/5a3f3a6d25fb4fc215791ad26613b0c9241ba05b.jpeg)

 ![Screenshot 2024-01-23 215214](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/a/eda9fa90fa5e78543d987342b6d30f96fdd1a3ff.png)

The static mesh for the road piece has collision and if used as a standalone mesh everything works out:

 ![Screenshot 2024-01-23 220057](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/b/3fb90a10439d0885f53650f559a194bdb1889f22.png)

This the construction kit i use to spawn the different road pieces:

 ![Screenshot 2024-01-23 215116](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/c/d1ca0eefc584b987ad39cf6714a98c1273a9e70c.png)

Is there something else to do with the static meshes that are being used for a spline mesh?

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 24, 2024, 2:04am UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/2 "2024-01-24T02:04:00Z")

</div>

What does the mesh collision look like? (Of the original mesh)  
Does it even have a visual debug?

Generally, it won’t work with sheets or complex as simple.

---

<div class="post-metadata">

**Author:** ![agosch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@agosch](https://forums.unrealengine.com/u/agosch)\
**Post date:** [January 24, 2024, 3:25pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/3 "2024-01-24T15:25:27Z")

</div>

@MostHost_LA The collision of the orignal mesh looks like this:

- Complex collision:

 ![Screenshot 2024-01-24 161523](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/e/29ebe6ea6ba8bee43951f10d4227d77e2d98e2c9.jpeg)

- Simple Collision:

 ![Screenshot 2024-01-24 161612](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/9/879952be6871e94e20115662ca788e957209cec6.jpeg)

And yes i have “Use Complex Collision As Simple” selected.

Regarding “it won’t work with sheets”, so it is generally better to have a closed mesh if working with a spline, if i interpret this correctly?

My next try would be to create custom collision in blender and re-import the mesh.

Update: I have now tried to make a custom collision in blender.  
In Blender it looks like this:

 ![Screenshot 2024-01-24 163418](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/a/64a1d45d6fb083d213925ae4ee92f0fc22096f54.jpeg)

And is Prefixed “UCX\_” and in the asset browser it looks like this:

 ![Screenshot 2024-01-24 163122](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/3/f13b582c78d1f71ae87bc5bf89dc2357507a59c9.jpeg)

When i look in the editor with “Player collision” as view mode i get this result:

 ![Screenshot 2024-01-24 163658](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/9/5c938c4b676e0f2a6aa0aab2be26a538b3f99534.png)

On the right barely the static mesh version of the road piece and one the spline the left.

Update #2: For testing purposes i have now created a very simple closed mesh.

 ![Screenshot 2024-01-24 165409](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/5/b45007a69afe4aa1babea2ed98592a7093abe12c.png)

But with this it still occurs as soon as the spline gets closer to another static mesh with collision:

 ![Screenshot 2024-01-24 165444](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/7/55732b97681e7fd9c7313efcd4f9ef25ce7657ac.png)

As soon as a certain distance between the spline and the static mesh is given the collision starts working:

 ![Screenshot 2024-01-24 165501](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/e/7ae8d7c5ffc421550edb6a0d791241cd9beb04e2.png)

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [January 24, 2024, 4:00pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/4 "2024-01-24T16:00:54Z")

</div>

Collision generally works best with convex shapes.  
Collision that’s as complex as your mesh with hundreds of triangles, will use a lot more CPU than typical convex decomposition hulls (or plain boxes.)  
A spline will deform the mesh, so even if it looks convex in Blender, it might become non-convex and invalid when bent/deformed.

Recommendation: Define simple collisions. Use a simple box for that if possible.

---

<div class="post-metadata">

**Author:** ![agosch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@agosch](https://forums.unrealengine.com/u/agosch)\
**Post date:** [January 24, 2024, 5:03pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/5 "2024-01-24T17:03:40Z")

</div>

@jwatte I have now followed your tip and created a very simple mesh with a simple collision box. But somehow the error still occurs depending on how far the spline is away from other static meshes with collision on them. These is my testfile:

 ![Screenshot 2024-01-24 180102](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/a/3ea18554e34a8cb12c5554837e8be07d7ecea5bb.png)

[SplineTest.rar](https://forums.unrealengine.com/uploads/short-url/BVSDF9C1VgcaeWdWJeibWemz3R.rar) (97.7 KB)

Is this maybe a bug in 5.3? Is it important for the construction script at which position of the graph i enable the collision for the spline?

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 24, 2024, 7:31pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/6 "2024-01-24T19:31:47Z")

</div>

Very possible it is an engine bug.

However, if you see triangles like in the screenshot, then the collision is not a “box”  
(Ans this too could be an engine bug).

To have the street mesh bend around and provide collision you should make up the collision of the same amount of boxes as the mesh has subdivisions in the forwad axis (direction of travel?)

My regular road tiles are 10m long with 1m sections.  
Each of those sections has a box collision or a UCX/UBX.

Whenever possible, dont use spline for it. Because with spline you cannot instance stuff.

A good road is made up of instanced parts, and has turns/twists you would otherwise need custom models for set to the spline instance.

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [January 24, 2024, 8:04pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/7 "2024-01-24T20:04:50Z")

</div>

Are you still using “Use Complex Collision As Simple” ?  
That doesn’t work for splines if I recall correctly.  
You need to mark up the static mesh with a simple box collision _in the unreal mesh import/editor_ because a “box collision” is different from a “mesh collision that happens to look like a box.”  
There might also be a way to make Blender generate the appropriate mark-up in the output export file, such that the engine generates this simple collision primitive automatically, but I haven’t looked at this for the last 10 years or so, so check the art path documentation …

---

<div class="post-metadata">

**Author:** ![ZacD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZacD](https://forums.unrealengine.com/u/ZacD)\
**Post date:** [January 24, 2024, 9:08pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/8 "2024-01-24T21:08:59Z")

</div>

I do splines with simple collision all the time. It’s a bit of extra work, but I break up the collision into a bunch of boxes in my 3d modeling program before importing and UE will deform those with the splines.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 24, 2024, 11:39pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/9 "2024-01-24T23:39:06Z")

</div>

> [@jwatte](#):
>
> There might also be a way to make Blender generate the appropriate mark-up in the output export file, such that the engine generates this simple collision primitive automatically

Labeling collider meshes as UBX\_meshname.istnacenumber

Usually does the trick.

And the docs to follow for naming/etc.

> **[FBX Static Mesh Pipeline](https://docs.unrealengine.com/4.27/en-US/WorkingWithContent/Importing/FBX/StaticMeshes/)**
>
> Setting up, exporting, and importing Static Meshes using the FBX content pipeline.

Ofc, I use my own custom FBX exporter, which I did modify to allow proper exports.  
I honestly do not recall if the default exporter considers the naming that way or not.

But anyone can likely watch a blender tutorial on it. Surely there’s plenty…

---

<div class="post-metadata">

**Author:** ![agosch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@agosch](https://forums.unrealengine.com/u/agosch)\
**Post date:** [January 25, 2024, 1:23pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/10 "2024-01-25T13:23:57Z")

</div>

@jwatte I have now tried all the collision setups, but yes “Use Complex Collision As Simple” was my default setup. But changing it did not change anything.

@MostHost_LA @ZacD I tried with UCX\_ and UBX\_ (according to the docs) and it got imported correctly in each case:

 ![Screenshot 2024-01-25 140301](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/e/faec827a00fa49c20231a19b347310f4814e42d9.jpeg)

And as long as it is used as a static mesh it works perfect. As soon as it gets used with a spline the bug appears under specific curcuimstances.

[SplineTest\_2.blend](https://forums.unrealengine.com/uploads/short-url/3SuopgLPnrM8C9Rzj4Y0q353CWk.blend) (983.9 KB)

It really looks like that it has something todo with being close to another surface with collision. I made now additional tests where i place static meshes with collision close to spline mesh, as soon as it gets close to the spline, the collision does not work for that small part anymore:

Still working:

 ![Screenshot 2024-01-25 141927](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/2/0f2e07ebd0c48a542b84d1ceac7a53686bc91117.jpeg)

Stops working:

 ![Screenshot 2024-01-25 141821](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/4/224b1d4cc89d6975981da23b6bc3e28d359c374b.jpeg)

And it only stops working for specific part that is above the object, the rest of the spline is perfectly working.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 25, 2024, 3:08pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/11 "2024-01-25T15:08:49Z")

</div>

Ok… does the visual collision reflect this?  
Yes = engine bug  
No = maybe something is up with the character movement?

Given I have never seen this happening I’m leaning towards engine bug…

---

<div class="post-metadata">

**Author:** ![agosch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@agosch](https://forums.unrealengine.com/u/agosch)\
**Post date:** [January 25, 2024, 4:44pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/12 "2024-01-25T16:44:51Z")

</div>

@MostHost_LA If you mean the “player collision” view, it does not reflect that at all:

Problematic distance:  
 ![Screenshot 2024-01-25 173513](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/e/f6e99caa522895ebdb11e86a9cb359f41198f571.png)

Non-Problematic distance:  
 ![Screenshot 2024-01-25 173524](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/e/5ce17411fc8e5fb60847af43cbef9d685a9b753f.png)

If you mean the “show COLLISION” during runtime, it also does not reflect it:

Problematic distance:

 ![Screenshot 2024-01-25 174009](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/6/ad6699863d8d11ed6b03b704c71e6fded4c58c46.jpeg)

 ![Screenshot 2024-01-25 174226](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/7/aa72a1580491cfc9e0b74e09e977b2d81b77c256.jpeg)

Non-Problematic distance:

 ![Screenshot 2024-01-25 173924](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/2/5423946f8084d2fe90399d3cb03380c480e4c61e.jpeg)

For this tests i played around with the collisions settings of the meshes and it never changes the outcome.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 25, 2024, 7:34pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/13 "2024-01-25T19:34:55Z")

</div>

Yea but you can clearly see here that the issue is bad foot IK, not the collision.  
Character capsule is where it ought to be, so it isnt an engine bug.

Disable the IK and it will be back to normal.

---

<div class="post-metadata">

**Author:** ![agosch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@agosch](https://forums.unrealengine.com/u/agosch)\
**Post date:** [January 25, 2024, 7:43pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/14 "2024-01-25T19:43:01Z")

</div>

@MostHost_LA Thanks for the help, with the IK deactivated it now works:

 ![Screenshot 2024-01-25 204116](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/5/a/85a6c501ad7a30a28ea42fcdf94f9d983a024858.jpeg)

Sorry, if this was a stupid question but i would have never thought about the IK of Quinn as the source of the problem.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 25, 2024, 7:57pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/15 "2024-01-25T19:57:28Z")

</div>

Not stupid at all!

And the reason it was worse with complex as simple is that collision was too thin.

As the collision became thicker the issue started occurring less.  
Thats what made me think it had to be character movement related - the visual of the collision was really just the confirmation.

Glad you sorted it.  
You can likely improve on the IK so that it doesnt overshoot collision (assuming you made it, if thats part of the engine now, well then you need to file a bug report on it?)

---

<div class="post-metadata">

**Author:** ![agosch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@agosch](https://forums.unrealengine.com/u/agosch)\
**Post date:** [January 25, 2024, 8:36pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/16 "2024-01-25T20:36:20Z")

</div>

The one in the screenshots is the default UE5 Mannequinn. I always use it for prototyping something.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 25, 2024, 8:44pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/17 "2024-01-25T20:44:16Z")

</div>

If you havent touched the IK/settings, I would suggest filing a report for this.  
Its a bug with calculations that should not be happening in the “default” setup.

---

<div class="post-metadata">

**Author:** ![agosch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@agosch](https://forums.unrealengine.com/u/agosch)\
**Post date:** [January 25, 2024, 8:46pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/18 "2024-01-25T20:46:53Z")

</div>

I will report a bug, because i did not change any setting on the character or its IK at all.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [February 24, 2024, 8:47pm UTC](https://forums.unrealengine.com/t/problem-with-road-mesh-collision-if-used-with-spline-mesh/1637602/19 "2024-02-24T20:47:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
