Set direction or velocity of chunks in destructible mesh

Hi all,

When I have a destructible mesh in a wall, and it explodes, many of the pieces go up and down, this in turn, does not make the chunks get out of the hole in the wall, where the destructible mesh is.

To fix this, I need to send all of the chunks out of the hole, instead of up and down.

Here is an image, showing what I mean,

The red arrows represent the direction where the chunks are currently going, and the green is where I WANT them to go.

How do I set the direction/ velocity of the chunks, when the destructible mesh explodes?

EDIT: Still no luck. I have already been applying radial damage to it but that does not help. If you want to see my set up there is a link to it in a comment below.

I’m also interested. Maybe some ‘force field’ collider that gets all physics actors and add impulse to them in one direction?

Hi ShrewGlue and Slavq,

I’ll cover setting velocity and direction towards the end.

This shouldn’t be too hard to setup.

Some of this will require you to set it up in your weapon if you’re using that a method to destroy the DM or in your Level BP if you don’t want to use a player weapon necessarily.

Regardless, the setup is similar. If you want destroy a wall piece that is blocking a corridor or something in that style, you would want to use radial force Actors to push your assets in certain directions.

For instance if I’m wanting the chunks to block back away from the player I would set a radial force actor on the front side towards the character so that when it goes off it can push the pieces away.

At this point, In my details panel for my DM I would also adjust the large chunk threshold value so that pieces that are smaller or below this threshold would not block the player from passing. Just tweak the value here until you get a result you like. (You can also see and example I’ve setup up in my forums post with Large Chunk Threshold: [TUTORIALS] Photons Be Free: Mini-tutorials and other curiosities - Community & Industry Discussion - Epic Developer Community Forums)

Ideally using the Fracture Impulse Scale located in your DM’s settings would be the best option to get pieces to separate, but in an enclosed corridor if the pieces can’t push out away from each other this will not be really effective.

While there are options to control the direction of a DM this is more project specific and requires you to change some the axis locks in your project settings. This is more for 2.5d, top down, side scrolling type games where you don’t need three dimensions.

The best use here is to setup a radial impulse that fires to apply damage and “push” the pieces in the relative direction that you would like.

Thanks!

Tim

You’re most recent video, (and the forum post that’s linked to it) is exactly what I needed!

Tim Hobson made a video about this here: Destructible How-To #5: Do Not Fracture - YouTube
Check out the forum post in the videos’ description for more info.

as an aside. That demonstration is using a radial force actor to push the pieces out of the way. It’s not direct control over the direction of the chunks. The Velocity can be controlled for the chunks with Max Chunk Speed. This will only work to keep chunks from going too fast. it does not set a value for the speed they will always travel at.

Glad you’re keeping an eye on those vids. Feel free to throw some suggestions in the forum thread if you wish. I want to start doing more simple setups for DMs over the next month or so when I get more free time.

Hi Tim, Do you have any info about applying force to a single piece of a destructible mesh?

I was trying to do this via an overlap but when I apply force to a single piece it moves the entire fractured mesh.

I was using GetWorld()->OverlapMultiByObjectType(…);

It would return all the overlapping pieces with the correct number of pieces. The actor name was correct but for each piece it gave the same component name:

(Component = 0x00000210b55ec100 (Name=0x00000210b82cddc8 “DestructibleComponent0”))

If I applied force to only one component it would move all of the pieces, Even those not overlapping. Is there a way to get the specific bone name from the component?