Hello!
After another night’s adventure in UE4, I find myself unable to figure out how to get my gun’s projectile to destroy a destructible mesh.
Any insight into this? Any help is appreciated. Good night.
Hello!
After another night’s adventure in UE4, I find myself unable to figure out how to get my gun’s projectile to destroy a destructible mesh.
Any insight into this? Any help is appreciated. Good night.
Hey VFX,
There are a number of things that could affect this, unfortunately, so we’ll need some more details. Specifically, can you tell us more about your projectile (its component hierarchy, collision settings and physics settings) and your destructible mesh (its Damage Parameters, Debris Parameters, Advanced Parameters, and Special Hierarchy Depths are all super important)? Images are always helpful if you can provide them. Thanks!
#Radius Damage and Damage Of Destructible Component
Dear VFX,
When you detect that collision occurs between projectile and mesh (I am assuming you have that part figured out already)
then you need to run BP node that is under Destructible component section, either Do Damage or Do Radius Damage
It is important that it be under Destructible Component section!
Then it will work
Hello! I haven’t yet set up anything to detect collision between projectile and mesh. I didn’t even know I needed to do that! As you’ll see, I’m a novice at this and am trying to piece this all together.
I appreciate both of your input. What I’m going to do is treat these almost as pieces to my puzzle and see if I can figure it out using information you have given me + documentation.
I will report back again for more hints if I am still unable to (this is likely).
Thanks again, and take care!
Okay so after a few hours of pouring through documentation and experimenting with settings, I have been unable to figure out what I need to do. If I had to guess, I would say that there is some Blueprint work I need to add to projectile. I should add that this is basically default FPS Blueprint template I’m working with. Also worth noting is that I noticed that pretty much what I’m going for works in Shooter Game example. I dove into that for awhile, but I still couldn’t find what I’m looking for.
Here are screenshots of both projectile Blueprint and my Destructible Mesh’s settings:
#Step 1
first step is to get collision to occur between your projectile and your destructible mesh!
you should go into default properties of your projectile blueprint and look for collision settings, and see what they currently are!
Then check destructible mesh collision settings.
I presume you have a projectile blueprint? and a destructible mesh blueprint?
Could post collision settings for each?
I’ve attached screenshots of destructible mesh’s collision settings, projectile’s collision settings, and projectile Blueprint. I’ve made a DM BP as well but it’s blank.
I’ve changed all of those settings during my testing, such as Simulation Generates Hit Events. Also, there seems there may be a bug with making DM BPs?
I’m experiencing that too. As soon as you start simming, it explodes.
Here it is working in Shooter game example by simply making a DM out of mesh and placing it in level. It doesn’t even have “Simulate Physics” or “Simulation Generates Hit Events” activated.
][1]
I found a solution that works not sure it is best "“Noob here”
Turn on [Root] Collisioncomponent - Physics - Simulate Physics
Change “Sphere” or what object you place in collision component - collision presets to block all.
it should work without much tinkering of you DM except for basic adjustment to your liking
DM’s simulation generates hit events need to be on. Gravity is optional
Thank you so much for your reply. Whenever I set my projectile BP as you mentioned, projectiles themselves stop firing. Am I doing something wrong?
When you spawn your projectile, do you have Spawn Even If Colliding enabled?
I just tried checking that and either way, no projectiles spawn.
I keep waking up in middle of night in a cold sweat thinking of this. I hope someone can answer soon
I think you should restart with a new FPS blueprint and test just settings above. This will help you understand whether problem lies outside this thread. My settings are used on a new FPS blueprint template you should not touch anything.
Yeah that’s what I did. But when I do it, no projectiles spawn from gun. Here is exactly what I did, step by step:
Result: At this point, when playing game, no projectiles are spawned from gun.
Hey ,
When I follow those exact steps, weapon fires as expected. Have you upgraded to 4.2? Did you alter MyProjectile Blueprint in any other way? Does this happen with every fresh project?
Hey ,
Thank you for getting back to me. Actually, I am still on 4.0.2. I haven’t changed anything other than steps above, and yes it’s happening with every fresh project. I will gladly upgrade to 4.2 if that fixes this for me!
This does seem to work in 4.2 without any issues, so if there isn’t a particular reason not to upgrade I definitely would. I think this was a bug with Collision system that has since been fixed. If you would prefer to stay in 4.0, you can switch Sphere mesh’s Collision Preset to No Collision, or to Custom with No Collision under Collision Enabled. Should work fine after that.