I remember that I had to use the attribute “Use Complex Collision as Simple” or something like that for collisions to work on dynamic meshes. I’m pretty sure there is a more correct alternative, but at least, it worked for me.
I’m pretty sure you are required to at least create the points, triangles, then add them both to the mesh, AND THEN use the “Set Dynamic Mesh Collision from Mesh” Node
I don’t really know whether this is a good/optimal solution or not, but it works for me and I could care less TBH
I just figured out that collision shapes are not “applied” when generated. You still need to use this function to assign it to the dynamic mesh component.
I just needed a DynamicMesh with complex collision to use LineTraceComponent from an Editor Utility BP. Turns out my problem was the mesh had too many polygons, so I just had to set this CVAR higher:
I wanted complex because I have custom MeshAttributes per triangle in the mesh (TDynamicMeshScalarTriangleAttribute). With complex collision, the line trace returns the face index which I can then query the attribute values with. With simple collision, the face index isn’t returned (as you would intuit).
Eventually I saw an output log entry notifying me that the physics bodies weren’t being generated because MaxComplexCollisionTriCount was being exceeded.. but that took a while to find.. so maybe this will help prevent someone else from wasting as much time as I did.