Okay, I seriously don’t understand what is needed for a Hit Event to trigger.
I have the player shooting “bullets”, which I want to trigger a Hit when it collides with… stuff. I need the Hit because I want the exact location, which I don’t get with Overlap.
My projectile has a projectileMovement component, a mesh and a capsule collider with “Generate Hit Events” checked.
I’ve tried different things in my projectile blueprint. Having the capsule collider assigned to its own Hit event and/or just using the Actor Hit event.
However, I never get it to trigger no matter what it hits. I tried BSP (which I know shouldn’t work according to what I read, so that’s fine), static mesh, physics simulating meshes. But it never triggers.
“what is being hit” - You mean in “other”. I shouldn’t have to define that unless I want to “use” it for comparisons or whatnot. Step 1 would be for the Hit Event to fire of when hitting any and everything.
Did you try to add a sphere in the components of the blueprint.
Then set the collision on the sphere and use the Event Hit node to detect the collision.
I think the problem is that your collision preset is set to OverlapAllDynamic.
When this is the case you will only receive overlap events, not hit events. You’ll need to change the preset to something else (for example PhysicsActor)
Note that when you pick the preset it will show you under the drop box what objects it will block (hit), overlap, and ignore.
Yay! I changed it and it does indeed trigger now when hitting physics objects.
For some reason though, it does not trigger on Static Meshes - shouldn’t it?
I’m coming back to this, after a looong break. The problem remains, and I cannot figure out why.
The objects **do **have collision.
I can go as far as to take a physics block with “Simulate Physics” ticked, make a duplicate of said object with the only change I do is to uncheck “Simulate Physics”. A Hit event will be generated on the physics one, no reaction on the other.
The projectile has “Block” on all Object Responses. (Physics object is PhysicsBody and none-physics is WorldDynamic. Also tried WorldStatic)
I’m having the same problem and I looked at the collision component more closely in the first person template for the first person projectile to understand why I’m not getting hit events either. In this collision component for the sphere collider under Object Type I see Projectile. In my project for my projectile, I don’t see Projectile as something selectable.
I have the same problem, I have a generated terrain from brickgame and the my character pawn doesn’t collide unless I use the charmovement script, I want to use it as a top down camera and so far I have made the movement and zooming but the colliding is not working. I can only fire overlap between the terrain and my character’s capsule nothing else, I put an actor, a sphere with and without sphere collision and it keeps overlapping, I select blockAll to myself and the sphere actor but it doesnt register anything.
The sphere’s mesh has collision that I can see when i double tap the static mesh.
If characterMovement is enabled, it will actually collide and bump successfully on the terrain and register a hit but guess what, I start spinning randomly in random direction and random circles, its like when I bump slightly on the wall I am thrown away.
Interesting fact is that when I remove the walking from “default land movement mod” in characterMovement and choose flying the collisions stop occurring and I move through everything.
FIX
Finally I found a workaround after 3 days looking how to fix the collisions. If I get collisions when gravity scale is 1 and none at 0 then I went below 1, the lower I got the slower I got repelled in a random direction when I had a collision, AND at 0,0001 I have collisions with registered hits and no feedback/repelling after collision.
Hoping this helps someone, I found out that my custom actor movement was to blame. I unticked “Sweep” from one of the AddActorOffset, which is what stopped hit events from happening.
If you have a custom way you move your actor around, maybe check that you’ve ticked “Sweep” so it will generate hit events as it moves around.
Just in case this helps someone:
The collision component seems to have to be the root component in the Blueprint. If you have a mesh as the root and collision as a child, you don’t get hit events from sweeping. You’ll still get the hit events if something hits you, but not if you hit something else.
This solved my problem thank you! I have Collision Spheres that update every frame to the location of my players hands. The Set World Location nodes I used didn’t have sweep on. Now the Collision Spheres register hits.