Download

Issues with destructible meshes

Hi all,

I’m starting work on a little asteroids game with destructible blocks instead of asteroids. Unfortunately, the destructible meshes sometimes, after being fractured, seem to lose most of their mass; they start flying around the level at the slightest impact. I’m only using impact damage, from physical projectiles. If I turn off impact damage so they are indestructible, there’s never a problem. I tried messing with the settings and nothing fixed it. I have two blocks in my scene at the moment and generally one of them messes up and the other works fine. Grrrr! Any help will be greatly appreciated!

Here are the settings for my destructible mesh:

Hmm. Also if I enable gravity the problem never happens.[Edit: Oh, scratch that, it still happens sometimes with gravity on.] I’m inclined to think destructible meshes are just really buggy? Considering that changing the Mass Scale or the Mass in Kg has no effect, only the physical material density actually changes its mass.

Update: Aha, yes. Apparently my “asteroids” are sometimes getting their mass set to zero. I had them print out their mass and as I started shooting them, one suddenly changed.
Anyone have ideas about how I can isolate this problem?

2f302f6f16ea8fa7dadda5a6999e61bfdfadbe31.jpeg

[Edit] OK, even weirder. Sometimes when a block prints it’s mass as 0.0 it still behaves correctly, as if it’s mass never changed. I also tried printing the mass scale, but that always stayed at 1.0. I did have my material’s density set very high, but I tried setting it back to 1 and it didn’t affect the issue at all. I tried having each actor print that too, but it always stayed correct.

Dang, no I guess it’s not the mass, something else is happening. As soon as a mesh gets fractured at all it’s mass goes to zero regardless. I tried Tim Hobson’s demo project, put one of his meshes into a blueprint and told it to print it’s mass. Same thing, the mass went to zero when it got fractured.

[Edit] Now I tried turning off ‘Simulate Physics’ for the blocks. I tried it 16 times and the problem never occurred. I turned Simulate Physics back on, and the problem happened 7 times out of 12. So that seemed to remove the issue, but then the blocks don’t behave the way I’d like them to with it off—they stay still until they receive enough damage to fracture a chunk, then all of a sudden start moving around. I wish the documentation actually told you how this stuff works . . .

Unfortunately mass with destructibles has been bugged for a while. I’m not at work to pull up the referenced JIRA though. Some have gotten around this by applying a physical material to the DM amd setting a high enough density in the physical material. This has work in some cases for me but there still seems to be issues here and there with it. Maybe try that and see if that helps get a little more stability for you.

Hi Tim, thanks for the reply.
Yeah, I discovered that issue with the mass through some trial and error, and found a forum thread about it. Using the physical material settings seems to work. I’ve been fiddling around a lot and the issue I’m having doesn’t seem to be directly a mass problem though. It’s an intermittent bug, it happens about half the time. Currently I think that the physics simulation (that you can toggle for any static mesh) is somehow conflicting with the physics of the destructible chunks. If I turn off physics simulation there are no issues, but there’s also no physics on the object UNTIL it fractures.