Projectiles not colliding with wall

Hello,
I am trying to create projectiles which are shot by a weapon and collide with everything in the world.
I did it as it is done in the FPS template, except I created a base class for projectiles which actually has no properties. It is just a base class.
Then the actual projectile blueprint which I use has a collision component, a mesh (as a child) and a projectile movement component.
I created a collision object channel which has default response “block”. I also created a collision preset which is just like the projectile preset in the FPS template.
Here are the properties:

But the projectiles collide with nothing. They just go through all walls.
Did I miss something?

You need to add a collision to the walls as well.

Load the mesh in to the Shape Editor and add a collision there … or add it in the level from the properties window.

I am not sure what exactly you mean. Do you mean the wall itself?
I looked at the collision properties of the wall, and everything seems correct. It is supposed to block the Projectile.
Here is an image of this (you can see the selected wall and the collision properties):

It is a static mesh.

Is it a BSP Brush or a Static Mesh?

You need to give the static mesh a collision.

Static Mesh Collision Reference

FBX Static Mesh Pipeline

Creating collision on static meshes ← Previous AnswerHub

Hello,
Well, the Walls and floor used are the walls and floor in the 3rd Person template in the example level.
I examined the mesh which belongs to the wall and it has a collision. I also deleted that collision and added a new simple box collision. That changed nothing.
Here is an image of the mesh in the editor:

I could solve this error. But the cause seems very strange to me.
I deleted the Base class and created a projectile which is just a subclass of Actor. Then I set up everything as before and it worked.

Conclusion: Having a base class for projectiles which is a subclass of actor seems to induce this error.
Is this a bug?

1 Like

Did you solve this? I am having this issue with the static meshes from the Infinity Blades package. My enemies (prefabs from the Shooter Game demo) shoot through everything, even though they have collision and Block set for projectiles.

1 Like

Your collision settings look good.

I had a simialar error when using the third person template project.

In my projectile blueprint, in it’s components, I had to merge the collision mesh to the root. (click and drag on the icons) my component list went from:

[root]

SphereCollision

-Mesh

Projectile movement component

To

[root]SphereCollision

-Mesh

Projectile movement component

As soon as I did this the projectiles started hitting things and even had the base speed i had entered.
Hope this helps someone

2 Likes

Totally worked for me, thank you sir!
I can’t really figure out why it solved the problem though.

You’re Welcome,
I know basically nothing of the Engine, but based on the behavior I’ve observed I’d venture that when you make a new blueprint the root in left blank as who knows what you want to make, and the root overrides all its children settings. So it being blank overrides all our nice settings with Null. By assigning an object to the root level we are telling the engine that this is what it is and that we want these settings.

Again pure speculation. But glad the Data(from last post) helped.

Fly Free
~D

So this really bothered me as I’ve been having a ton of issues with collision. This is how you fix it:

Step 1: Go to this link How do I make a projectile hit the walls? - Blueprint - Epic Developer Community Forums and scroll down to azennig’s answer. Copy the image of the blueprint he posted labeled “collisionevent.png (170.0 kB).”

Step 2: Create 3 components for your projectile: ProjectileMovement, Collision, and a mesh/sprite/flipbook (whatever your object is).

Step 3: Click on your capsule component and tick the boxes that say “Simulation Generates Hit Events” and "Generate Overlaps Events. Then set Collision Presets to > “OverlapAllDynamic.”

Step 4: Click on your mesh/sprite/flipbook component. Tick the boxes that say “Simulation Generates Hit Events” and "Generate Overlaps Events. Then set Collision Presets to > "BlockAllDynamic.

Step 5. Make your collision (capsule, box, etc.) component the parent of your mesh/sprite/flipbook component.

You shouldn’t need a root scene. And ProjectileMovement’s placement doesn’t matter. What does matter is the hierarchy of your custom capsule/box and your sprite/mesh. Since I used a Capsule and a sprite, I made the capsule the parent and I made the sprite the child. I made my capsule component the parent because it will be colliding with everything before the actual sprite does. So it only makes sense for the parent object to interact with the world before the child.

I hope that helps.

You are my hero, I was searching for hours but setting the collision to the root of my projectile made id work! (I have a projectile setup like in the twin stick shouter tutorial)
Overlap with other pawns worked. But I could make it generate hit events when hitting was. This is needed because fast traveling bullets will not allways generate the overlap event.

So thanks again! :slight_smile:
by the way this official doc is very good for the rest of the fysics configuration Collision Overview | Unreal Engine Documentation

Thank you so much,

Thanks so much for this. I’ll just add (for anyone else who comes along) that I had to set Simulate Physics to True for the Collider, but Simulate Physics to false for the Sphere Mesh itself. Thanks everyone else for their detailed answers.