Can't get Event Hit to work

For a while I’ve been trying to get Event Hit to work.
I got Overlap to work perfectly but I need Hit instead of Overlap for some of the Event Hit functionality.

I tried everything, found no fitting tutorial. It’s pretty straight forward.

This is the projectile collision setting:

This is the Static Mesh collision setting:

No collisions are ever detected. What am I doing wrong?

What do you mean by “Hit over Overlap”? Are you trying to register both the hit and the overlap events? Actors can either overlap, block or ignore each other, to my knowledge.

I see. You can’t have both hit and overlap. An object can either hit another object or go through it. Take a look at this article about collision, hit events and overlap.

Sorry for not being clear. I meant I was trying to get an “event hit” to work, rather than an “event actor begin overlap”.

I just want any of these to go off on the projectile’s Actor BP.

I’m assuming you are using a custom mesh? Do you have collision setup in the mesh itself? Go into your mesh → setup collision there and also make sure you have simple collision on the mesh. (Toolbar → Collision → add simplified collision).

Also check your physics asset if its a skeletal mesh. You will need to click on the physics volume and make sure your collision is setup there as well. (Also make sure simulation generates hit events is checked in the collision section of your physics asset volume.

1 Like

Thanks! Do you mean the Physics Material Override?

This is empty right now.
I just made an Actor BP with a “cube” base asset.
I added a collision box bigger than the cube itself and set the settings exactly like I showed above.

Nothing changed (it was defaulted on everything set as “block”).

Are the settings above okay?

Thanks. I am familliar with this page and I have read it and followed its instructions.

I now also added collision boxes around both the projectile and the mesh I was shooting at with the exact same settings as shown above.

Nothing seems to work so far.

I got a little further.

I made a new project - the first person shooter one. In there, I made an Actor BP with mesh there and it worked. Then I duplicated all of the collision settings into my own project and it does detect hits now.

The big difference is that a collision box is now the Scene Root for the Projectile.

Problem now is: The projectiles no longer move.

When I turn “simulate physics” on in the scene root, it does move, but collisions no longer work.
When I turn it on in the Static Mesh as well, it doesn’t move nor collides.

What am I missing?

No you do not need the physics material override for this.

Okay, so you added a collision box bigger then the cube, what are the collision settings on that collision? Because if that collision is blocking the projectile, then the projectile will never hit the mesh, thus never calling event hit.

If you want the collision box to trigger the event hit then you need to set the collision settings on the trigger box and make sure you are using the event hit of the collision box and not the mesh.

I do not think you want to simulate physics on the scene root. Are you using the projectile movement component?

Yes I am. And all the components are set to “movable”.

I GOT IT!

The projectile just stopped because it hit me.
I hooked it up to the rest of the projectile blueprint I already had, made it spawn further ahead of my character and it works now!

All I need to figure out now is how to exclude the instigator from the collision options.
I think I’ll figure this one out, I’ve done it before.

Thank you so much for your help!

No problem, I’m glad you got it working!

The easy way is to just spawn the projectile a bit more forward so that it does not collide with yourself on spawn.

Hi,

I need help because it’s happening the same to me and I don’t know what I’m doing wrong :S I feel very stupid

  • I started with the top down starter project.
  • Created an Actor that is the bullet, it’s a sphere without collision and created a collision sphere that has projectile object type (I created this for the projectile, is this a good practice?), simulates hit events and block all
  • Then created a character, and I want to know when the bullet hits the capsule component that has hit event checked and projectile type blocked (it’s pawn)

When I make the character shoot another player (same class) the bullet doesn’t do anything, doesn’t do the hit event. but there is a blue box of the top down project that it generates the event, what is wrong? only generates the event with the blue box, even the static meshes with staticworld type doesn’t trigger the event.

with overlap it works If I put the capsule to generate overlap and the bullet with the begin overlap event it works… but I want to make it work with hit event, it’s possible? or I should just go with the overlap event?