# (UDynamicMesh / Geometry Script): DynamicMesh not connecting properly

**URL:** <https://forums.unrealengine.com/t/udynamicmesh-geometry-script-dynamicmesh-not-connecting-properly/2450908>\
**Category:** C++\
**Tags:** unreal-engine, geometry-script, geometry, CPP, question\
**Created:** [April 11, 2025, 9:07am UTC](https://forums.unrealengine.com/t/udynamicmesh-geometry-script-dynamicmesh-not-connecting-properly/2450908 "2025-04-11T09:07:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MariusPVI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MariusPVI](https://forums.unrealengine.com/u/MariusPVI)\
**Post date:** [April 11, 2025, 9:07am UTC](https://forums.unrealengine.com/t/udynamicmesh-geometry-script-dynamicmesh-not-connecting-properly/2450908/1 "2025-04-11T09:07:08Z")

</div>

Hi all,

I’m currently working with **several surface meshes** in UE5 (via `UDynamicMeshComponent`) that are **almost connected** , and my goal is to **merge them into a single watertight mesh**.  
I started by creating a UDynamicMeshComponent for each surface (geometry data is imported from an external source). The example I am working on looks consitst of four individual DynamicMeshComponents like this.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/b/2dba4c8817be5e2ca2aa8902b06103540f5af7a3.jpeg)

I then merged the 4 UDynamicMeshComponents into one Component for easier handling (also meaning there is only one DynamicMesh from now on). The imported data is strucured in a way that these surfaces do not intersect or touch as seen in the next screenshot.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/e/7/6e71e2336b85d1b353e3f62c4e82a32e0af71900.jpeg)

I modified the boundary edges in a way that made all surfaces stick through each other, which looks like this.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/4/9b4a50bcfecb08d209fc8061f91af8075e634e5b.jpeg)

Then I perfomed a bool mesh union of the mesh with itself in order to create the geometric connections of the mesh at the new intersection points. Here is a screenshot of before

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/7/297159d9fc20578d5bc97380bd42f6a1e577a752.png)

and after the self-union

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/4/714cca49d77b8067801658c85be30b30a208f1ad.png)

I am now looking for the new boundary edges of this modified mesh. However, when I try to obtain the boundary edge I get edges from the individual surfaces but never a new boundary loop for the entire geometry. When getting the number of connected components on my DynamicMeshComponent after the modifications, I also get 4, but I would expect only one connected component since I modified the mesh in the ways mentioned earlier. It also “looks” connected but I am at my wits end. Here is a final screenshot of the modified mesh where I looked up all edge IDs where “IsBoundaryEdge(EdgeID) == true” and drew a debug line between the vertices of each edge.

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

I also tried finding a shortest vertex path from the first vertex in one loop to the first vertex in another loop and this also fails, further indicating that I have not connected my individual mesh parts properly.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/9/2b96343e8db62884ccab4dcd7ef882c046d12338.png)

Sorry for the long post but it seems like I am missing something. How can I obtain the connectivity in my mesh that I need? Any help is appreciated!
