Destroy mesh on command

I’m sorry if this is something fairly simple but I have a box that I want to destroy when my weapon hits it and when it gets in the radius of a bomb (a blueprint using a RadialForce component). I’m at a point where I can destroy the box when the weapon hits it (I simply check if the actor colliding is my weapon blueprint and then apply radius damage to it) but it also gets destroyed when my character walks into it and I don’t want that to happen. It may just be a problem in the destructible mesh’s settings but I’d be grateful if someone could help me. Thank you!

Add a check for who is the instigator and check if it’s your character , you could also do it like this, onEvent ->instigator->getPlayerController->IsValid, if you get a valid return than the instigator is your character so don’t destroy on true.

I don’t know if that’s my problem exactly but thanks for answering!.
Here’s what happens when my player hits the box, it just kinda fractures it:

34069-box.png

And here’s what happens when my weapon hits it

34070-box2.png

And here’s my blueprint for handling it:

Here are my settings for the destructible, there might just be a problem with these:

Oh, I see now, well I assume the blueprint you posted is the Box destructible blueprint? If so just add a check like I suggested after the event is triggered. And then connect the “False” to your CastToBoomerangProjectile node.
Also want to point out you’re not doing anything with this node, you’d need to use “As Boomerang Projectile BP” pin and drag out of it and you get access to
it’s content. So in this case seems like you don’t need the cast.

It doesn’t seem to work but it seems that my character triggers the destroying of the mesh regardless of the blueprint, just a regular collision. So I think there must be something wrong with the settings. If there was a way for the mesh just to ignore my character’s collisions. Do you happen to know anything about those?:stuck_out_tongue:

Oops thanks for pointing that out, it just looked like it was working, I guess I’m back to square one then:P

Well depends on what you want to do, I haven’t done any destructibles , so not sure if you could set this up in there, probably not, one simple way would be to just turn off collision on your character, but that’s not good.

If you still want to have a box bounce when the character collides with it you’d need to have a non destructible mesh for that with physics enabled, and only when the boomerang projectile would hit the box, then you would first get and save box location into a variable, then destroy the box, and spawn another destructible box in same position, and of course then apply the Damage so it explodes.
So first make a non Destructible physics box , that would be my suggestion, let me know …

I would set that up in the boomerang projectile,
onEvent-> check if instigator(Other Actor) is a non Destructible box BP, if it is,
then GetBoxLocation->Destroy(Box)->SpawnActor(DestructibleBoxBP)->ApplyDamage .
Just take it slow, and report back when stuck, I’ll be online for few more hours, then I can help you tomorrow …

Yea that seems like something i could try. As my previous attempt to check if the actor that hits the box is my boomerang failed, do you know how i could check that?

That works more than well thank you!
Here’s my destructible BP:

Here’s the boomerang projectile BP:

It works really well but I’m not so sure about the rotation of the spawned destructible, it really doesn’t matter since it gets destroyed immediately but do you know if that gets the real rotation of the non destructible mesh or just something else entirely?

Congrats :D, nice work, well thought,
instead of getting the actor location, try getting “Actor Transform” directly.

Yup that did it thanks!:stuck_out_tongue: