Root component doesn't follow physics body, destructable mesh

When simulation physics for a destructible mesh, the root component doesn’t follow. This means it’s hard to get the actual transformation for the destructible mesh. With simulation on a static mesh, the root component do follow. Is this how the system was designed or is it an bug.

This makes things a bit harder if you for example want a character to carry destructible object, put them down, and pick them up again. We could of course switch between a static mesh and a destructible mesh, but again, is this how you intentionally designed the system?

We’re on 4.4.2.

Thanks!

This is an issue for any physically simulated component that is not the root component. Is the problem happening when you try to attach the destructible component?

When you attach you can specify to maintain world position which could help in this case.

To clarify, the destructible mesh is the root component in this instance. When simulating physics on a destructible mesh, the physics body moves, but the component location does not, unlike with a static mesh simulating physics. This means that the actor location stays put.

It is understandable if the component location does not move after destruction, but before destruction we would expect the mesh to behave like a static mesh.

Hello,

We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.

Thanks!

To clarify, the destructible mesh is the root component in this instance. When simulating physics on a destructible mesh, the physics body moves, but the component location does not, unlike with a static mesh simulating physics. This means that the actor location stays put.

It is understandable if the component location does not move after destruction, but before destruction we would expect the mesh to behave like a static mesh.

Hi Ella,

This was the expected behavior, but I submitted a change that should do what you want. When we update the destructible’s position from PhysX we check if it hasn’t fractured yet and update the actual component location.

CL-2438210

Please let me know if you run into any issues with this. This change should be available in 4.8

Thanks for the info

Hi Stephen,

Yes, it’s ok.

Hi Ori,

I’ve just tried taking the changes from CL-2438210, but as we’re still running on 4.4, quite a lot has changed. Instead I just decided to rework the fix into some helper functionality in blueprints/game code just so we can test.

By the looks of things, the fix you committed should definitely solve our problems.

Thank you.

Awesome.

You should take a look at CL-2440702 which fixes an issue with form extended structures not updating their component position correctly. This is a bug introduced by my change above. The issue with form extended structures is that it’s a bit more complicated to know if they’ve fractured. Since this feature only matters for destruction that is initially dynamic we can just expand the test from IsFractured to IsFracturedOrInitiallyStatic to opt out of updating the component position.