Procedural mesh component doesn't create collision data
I just started using ue4 and recently I've been working with the Procedural Mesh Component. Generating a mesh works fine. I'm generating a scalar field from a static mesh and then I triangulate this scalar field with the marching cubes algorithm to produce the same mesh. The generated mesh looks fine except maybe a bit dark.
However, I cannot get the mesh to collide with other objects. It seems to simulate physics, being affected by gravity and responding to AddForce() calls but no collisions. Does anyone have any idea as to what the problem could be? I thought the procedural mesh component would simply generate simple collision if I flagged the collision bool as true when calling "CreateMeshSection(...)".
My mesh generator has two components, the procedural mesh component and a static mesh component. Both are initialized in the constructor. The procedural mesh is then created in BeginPlay() and the static mesh is unregistered and destroyed there as well.
Thankful for any tips or hints, Olle
I have put my ProceduralMeshComponent into its own class, with no scene or actor or whatever on top (its the root component) and it works. yet I have only placed the c++ class into the level and it just starts itself in begin play, but im confident about it
tldr Solution: new actor class with UProceduralMeshComponent.h
answered Jun 12 '17 at 02:07 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here