Hi.
I added a sphere component inside myCharacter blueprint and moved a little forward the character. Then I added a OnComponentHit event to this sphere. But the problem is that this event never fires.
Now, if I add a OnComponentBeginOverlap, and set the “Generate Overlap Events” to true, on all my mesh walls, this event fires and the sphere touchs the walls.
So, is this a bug or am I missing something here?
Thanks.
Hello,
That is expected behavior. “Hit” is generated on Blocking collision, so the object would have to block the channel that is being hit. OnComponentHit does not consider overlapping or “collision-less” objects (like Brushes). I hope this helps to answer your question.
Cheers!
Well, I wrote “mesh walls” not Brushes and all my meshes have collision. So, the “sphere component” that I added inside myCharacter BP, should fire the ComponentHit event.
The “[ROOT]CapsuleComponent” fires the ComponentHit event for those mesh walls. So, any other component that I add inside the BP should fire that event as well.
I even tried duplicating the “[ROOT]CapsuleComponent”, but that event didn’t fire for this duplicated one.
What collision settings are you using on the Sphere Component? It needs to be blocking like the Character_Class’ CapsuleComponent is set up to do by default. Unless you have set the CapsuleComponent to overlap and are still getting hit results, in that case I will need to investigate further.
I tried several types of collision. “Pawn” like the “[ROOT]CapsuleComponent”, “BlockAll”, etc. None of them fires the ComponentHit event.
Seems like it could be a bug then. I want to test this further for the report. Could you please post a screenshot of the collision settings of the Sphere Component so that I can recreate it? Also, can you try turning on “Simulate generates overlap events” and “Multi Body Overlap” to see if that changes the results for you?
Thank!
“Simulate generates overlap events” and “Multi Body Overlap” Do not work also. No hitting event fired!
Hey ,
I am still testing this and I have another question for you. Are your meshes simulating physics? In order to generate hit events both objects being hit needs to have physics simulating as well.
You can find out more about using hit events here:
https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Events/index.html#eventhit
Thanks!
Well, I tried setting that property to true with my second capsule (I change from sphere to capsule ) component and on all my meshes. Nothing changed! No hit event!
But the Root Capsule component fires a hit event, even if I have “Simulate Physics” set to false.
The Root Capsule works differently in characters because it is more or less attached to the movement component, so it has its own unique way of generating hit without simulated physics.
I am saying the meshes in the world need to be Simulating Physics to get a hit on them. If that is not going to work for your purposes, you could describe what you are trying to accomplish with the Hit event, I’d be happy to find the best solution.
I tried also set the “Simulate Physics” for my meshes, but I still don’t get a hit event fired.
What I want to do is to have a detect a hit event when my second capsule touchs a mesh.
And I think that I found another problem with collision events. Since the event hit is not working for me, I am using for now, “Event Actor Begin Overlap” and “Event Actor End Overlap”. But the “Event Actor End Overlap” is firing all the time, even when I have my “capsule component” inside the other meshes.
The “Event Actor End Overlap” firing all the time, is because of the “Attach Actor to Actor” function that I am also using. If I remove it, it won’t fire anymore in the wrong time.
I am facing the same issue, has anyone found a solution for this?
Hi ,
Is this error still occurring for you or has it been addressed in a more recent version of the editor? If so I will mark this as answered for tracking purposes. Thank you!
Hi.
Well, the last time I wrote here, was in April. No body else answered, so I changed my approach. But I just tested. I added a sphere component to my character, checked “Simulate generates Hit events” and changed to BlockAll, also cheched “Simulate generates Hit events” for a box wall with collision. Added some print string to a hit event for that sphere component. And nothing! No hit event fired! And, as I said before: Only the “[ROOT]CapsuleComponent” fires the ComponentHit event for those mesh walls. So, any other component that I add inside the BP should fire that event as well. I even tried duplicating the “[ROOT]CapsuleComponent”, but that event didn’t fire for this duplicated one.
Hi ,
Unfortunately I was not able to reproduce this on my end. I placed a sphere with blockall and event hit to print string, which printed the name of the object hit in the player BP. This seems to work as intended. I am attaching the images of what I did to this post, can you see anything there that, if altered, would help me to reproduce this potential bug? Thank you!
You have a different event than I do. I was using a “OnComponentHit (Sphere1)” event. Just tried with “Event Hit” and with Event hit, it works, not with OnComponentHit.
So, thanks. Because will give me more options now. 
http://s30.postimg.org/f9utmgy8h/bug1.jpg
Even with oncomponent hit I was unable to reproduce this effect:
Try parenting the blockall capsule to your mesh component, see if that helps.
I just did that, and not a hit. kkk I changed the parent even to be the capsule, and nothing.
I hope it’s OK to chime in here, but I’m also still experiencing the same error, even after setting everything up the way you showed . Strangely, not even with “EventHit”. Nothing happens except for when the root capsule hits something.