Interacting with Destructibles

Hey all,

Hopefully a simple question. I have destructible meshes and am wondering if there is a way to interact with these pieces once the destruction has occurred? I’m aware I can push them around with my character but am wondering if its possible to pick up individual pieces?

The way picking up objects work for me at the moment is I tag things I want to pickup as “Moveable” and the rest of my code does the work, yet I can’t seem to pick up destruction chunks or find a way to individually tag them.



You can access the individual piece by calling GetBodyInstance on the destructible component and pass in the bone name of the individual piece. Getting the bone name is usually done through a scene query.
For example if you want to have a gravity gun you could first do a ray cast which would return you the bone name of the individual piece. You would then use the UPhysicsHandleComponent which takes in a PrimitiveComponent and a BoneName.

If you’re looking through the code take a look at how DestructibleComponent overrides GetBodyInstance - it creates a temporary BodyInstance object for the individual.

Hope this helps.

Thanks for your help! I’ll take a look into that now.