Destroy Destructible Mesh Through Trigger

Basically, for my first exercise in Unreal I’m creating a Mario clone. Right now I’m trying to create blocks that are destroyed when the player hits them with their head. To do this, I’ve been trying to use blueprint to cause damage to a destructible mesh when the player enters a trigger space just below it. The events are firing, but no damage seems to happen to the destructible mesh. I’m at my wits end, any help would be really appreciated!

Both OnComponentBeginOverlap and OnComponentHit have an execute pin (the white thing on top) that drives everything after it. Your Apply Damage function only runs when your actors overlap, but not on hit. Similarly, the impulse is most likely empty as your nodes are now.

You have two options:

  1. Connect the execute pin from OnComponentHit to Apply Damage and use that with the hit impulse or
  2. Remove the Location/Impulse pins and put a fixed amount (such as an upwards pointing vector) in there.

I’d probably go with 2., since the box is meant to be hit from below; not from the sides or elsewhere.

I had a feeling the OnComponentHit wasn’t being used properly here…but it was the only thing I knew of that would give me the vector input I needed.

I’m still unaware how to input a fixed amount for a vector, nor do I know how to set which direction it’s pointing.

I’ve updated it a bit with what I think is required.

However, damage is still not being done to the destructible. I’ve set up a print string to check this, and it doesn’t fire, even though the rest of the blueprint is apparently functioning. Have I somehow set the wrong target? Is it possibly because a blueprint can’t damage itself? I’m totally lost.

http://4st.me/Nvtob.png

You can right-click those Pins and select “Split Struct Pin” to get individual inputs.

36586-box.png

In my case, I got a Box similar to yours; a Destructible Mesh called Cube_DM (which is the target of Apply Damage) and a Box Collider called JumpArea below it (which is the one I get the hit location from; which shouldn’t actually be required).
Right-click the “Impulse Dir” pin and select “Split Struct Pin”, then set Impulse Dir Z to 1 to indicate up direction (you can actually leave that out; it works with all zero just aswell).
Cube_DM has a Damage Threshold of 1, and I apply a Damage Amount of 1, which breaks the Cube as soon as you jump at it from below. But it won’t break if you hit it from the side or with a projectile.

That did it! Thanks so much.