How to prevent projectile from falling through terrain

I have set up several different weapons that all work great when prototyping but now that I am working with terrain that we sculpted, my grenade and rockets from their respective weapons just go right through the terrain. My other weapons like my assault rifle still impact the terrain just fine and the only difference is that they have a tracer in the components. I have tried adding a tracer to my grenade and it still just falls through. I have tried adjusting the collision on all the components and nothing seems to work. I do not know what to do and would love some help.

Probably you have already tried this, but just to be sure,

Double check the collision channel settings, make sure your projectile has a collision component and it is set to ‘Block’ against ‘Terrain’. Then come back to your terrain and make sure its collision channel is indeed ‘Terrain’ and it is set to ‘Block’ against whatever collision channel your projectile is using.

I have collision set up as Block All for both at this time. My projectile does have a collision component that is set to Pawn just like my Assault Rifle but I don’t see anything about being able to block it against Terrain. Unless I am reading into what you are saying wrong. For some reason now my grenade launcher is not colliding with anything, in fact I don’t think it is even coming out any more.

You should also check the collision behaviour of your mesh. Try opening the renade model in the static mesh window and setting the collision to complex instead of default or simple.

I tried those suggestions and they did not seem to work; however, I managed to find a way to make it work. To explain I created a timer off Begin Play to loop every 0.2 seconds. Gave it the name CollisionEvent, and then created a custom event of the same name. From there I checked to see if the grenade was NOT overlapping with my Grenade Launcher. If it is not, then it will destroy the Grenade mesh and tracer, activate the explosion, play sound, and then destroy the actor when the explosion is complete.

I am sure there is a better or more proper way to do this, but it works for my game and so I will go with it for now. I hope that this will help someone else out as well.

Had this issue today while creating a blue print. Check that you’ve not somehow included the DefaultRoot node within the blue print. If you have. Just unparent the components and it should disappear from the BP.

Hope this helps.

5 Likes

This might be from 8 years ago but that just saved me so much confusion and I just wanted to thank you.

Old post but very helpful. Thanks!

Dude you are a ■■■■■■■ saint.