Simulate physics for a UProceduralMeshComponent
I have created a simple UProceduralMeshComponent (just a triangle) and passed 'true' to the last parameter in UProceduralMeshComponent::CreateMeshSection to generate collision. My goal is to create several different UProceduralMeshComponent with collision, and simulate physics on them so that they fall down and move around in the world according to the physics simulation (imagine creating a type of ball using UProceduralMeshComponent and then enabling SimulatePhysics so that it bounces around). When I call SetSimulatePhysics(true) however, the procedural mesh still floats up in the air where it was placed. I've also tried setting the collision profile, enabling gravity on the procedural mesh component, and waking the rigid body, but no luck. What do I have to do to get the UProceduralMeshComponent to simulate physics?
Here's my initialization in the constructor:
Here's my Actor's BeginPlay where I set the physics properties:
asked Nov 20 '15 at 06:38 AM in Bug Reports
Try moving your SetSimulatePhysics to the constructor. If this doesn't work, you could also attempt to create a blueprint based on this class and set simulate physics to true in the construction script of that blueprint.
answered Nov 24 '15 at 06:51 PM
Sean L ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here