UPDATE: It seems I cannot apply damage to a door prop and get it to break apart. If I simulate physics, enable impact damage, and set the value high enough, it will crumble when running, but applying damage to it does nothing. I built a project to demonstrate this: https://drive.google.com/open?id=0BxhpRUnYxJGheUZUcW4yMWtGbkE
Here’s what I’m trying to do:
Explode a door out when a button is clicked on it. (I’ve attached my blueprint example).
What I’ve got working:
The destructible door will fall apart when the button is clicked.
Problems:
If the player walks into it, it explodes. If I turn off impact damage, the player can walk into it without it exploding, BUT it won’t break apart when the button is clicked (it will just fly away as a whole door).
I can’t figure out how to apply a force to it that mimics what happens when a player walks into it. Instead, the force seems to shoot out around the door frame, leading to…
When the door explodes, it gets stuck in the door frame. I don’t want the pieces to impact stuff. Currently, they get trapped in the door frame and block the player (see attached picture).
1, turn off the onhit on the door, or disable collision between player and door
2, This is correct - you are applying the force at the doors current location, the force would spread it outwards… into the door frame. the force needs to be applied from the side of the door that the player is on, not the dead centre of the door, add a little offset to the force location(some of this applies to #3 as well, even better, use a line trace to determine hit location - this will give you more realism in debris scatter direction.
3, moar power, impulse strength 1 is like a fart it doesnt really do anything, i have to use forces in the hundreds or thousands to move small 2-3kg objects. even the stock cubes in the FPS project need about 150,000 force to move as they weight about 150kg.
Yes, I can turn off collision between the player and the door, but the door still gets stuck on the walls. What I want is for the chunks to not collide with anything so they can explode and vanish. If I turn off collision though, they don’t destruct.
2 and 3. This doesn’t seem to matter. It turns out, Apply Damage isn’t doing anything. I set the impulse to 150000, I moved the hit location vector (slightly in one test and a lot in the other), and I changed the impulse direction and damage. Nothing changed.
So I tried reordering the Apply Damage, as well as, removing it. Turns out, set Simulate Physics is causing my door to burst apart, but no matter what I do, I don’t seem to be able to script an impact like what happens when the player touches it.
I could do something drastic like make an invisible item crash into it, but that seems silly. Is there something else I need to do to make Apply Damage work?
took a look at the project, tried many things, cant get it to behave as expected, probably something to do with the force being applied to the door, but the door object is also destroyed the same frame, and would revolve around applying the force to the debris in the next frame