[Geometry Srcipting] What is the way to rebuild Dynamic Mesh collision?

Hi experts,

We are working on applying both physics and collision to a dynamic mesh boolean result. Since physics cannot go together with “Ues Complex Collision As Simple”, we keep the collison type to be “Project Default” and rebuild collison seperately, based on the boolean result mesh.

Here is the process.

  1. We perform boolean operation like this:

  2. We rebuild collision with “Set Dynamic Mesh Collision From Mesh”, using the result mesh from the last step:

And we get the result of cutting a cube. The mesh does get cut and it has physics, but the collision seems not being updated correctly. In the second image below, it looks like the cube collision is still the one before cut.


Overall, we expect the collison to be match with the result mesh. Is there a way to achieve that? Any help will be greatly appreciated!

1 Like

I think you need to change the collision complexity to “Use Complex Collision As Simple”

You can split the ‘options’ from ‘SetDynamicMeshCollisionFromMesh’ method or create your own struct with desired Method and params.

You are enabling physics on a mesh with complex collision. No meshes in unreal support physics for complex/per poly. Its for overlaps/line traces only.

Using xlip’s suggestion you should be able to build convex hulls for simple collision and enable physics that way, and in the use case you’ve shown here with simple shapes it will work fine. But for more complex shapes it will not be as accurate as your actual mesh