How are you generating the Mesh Vertices? Is it possible that you’re generating the vertices with an old transform? It could be that the ‘object’ itself is actually falling, but the mesh is being generated in the same location?
A good way to test this would be create a new actor with a PrimitiveComponent at the root, and your Procedural Mesh attached to that. Make sure you can preview the ‘Root’ in PIE and see if it drops during play. If it does and the mesh doesn’t, the problem is probably related to the transform of the ProceduralMeshComponent.
(This is all assuming that ProceduralMeshes can actually SimulatePhysics)
So i did what you were suggesting and it worked, the cube was falling down with the procedural mesh attached to it. So i was adding this code to the Actors Tick function after removing the cube again:
if (myMesh)
{
myMesh->SetWorldLocationAndRotation(this->GetTransform().GetLocation(), this->GetTransform().GetRotation());
}
But again, the mesh remains static. You did mention that all this is assuming that the ProceduralMeshComponent is capable to SimulatePhysics. How can i find out if this is the case? Or is there anything else wrong with my code?
Oh I’ve just thought of something, You’ll need a valid collision in order to simulate Physics on the object…
I bet if you print out whether the object is simulating physics or not, it’ll say ‘yes’ the first time when you set it, then ‘no’ after as Physics might be turning it off again.
Unfortunately no success. Still its IsSimulatingPhysics function is returning false. Has anyone ever used the UProceduralMeshComponent and its physics capabilities and made it work? I ask myself if it is actually working, because still the UProceduralMeshComponent is experimental.