# On Component Hit not working

**URL:** <https://forums.unrealengine.com/t/on-component-hit-not-working/2424261>\
**Category:** World Creation\
**Tags:** unreal-engine, question\
**Created:** [March 28, 2025, 1:10pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261 "2025-03-28T13:10:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![markelo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@markelo](https://forums.unrealengine.com/u/markelo)\
**Post date:** [March 28, 2025, 1:10pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/1 "2025-03-28T13:10:41Z")

</div>

Hello to anyone reading this,

I am currently trying to add some logic to my cars logic.  
I want to make it so when the car collides with anything but the landscape and some road meshes i have, it will pause the game and then show a message on screen prompting the user to press a button to restart the game.

So far i have added collision boxes to every mesh ( buildings, trees and car) and checked the simulation generates hit events on all of them.

In the BP\_Vehicle bleuprint, containing the logic for throttle, brake etc, i have added this

 ![Screenshot_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/3/6435ceccdc73214dd6be2ccd6f9c14c8d1ef4ac7.png)

Am i doing something wrong or am i missing something?

PS Roads is the actor tag i have for landscape and the road meshes

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [March 28, 2025, 3:20pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/2 "2025-03-28T15:20:55Z")

</div>

Hey @markelo!

I notice you haven’t mentioned the actors’ collision profiles! That could be where the issue is. If the vehicle isn’t set to block whatever the tree and buildings are (and vice versa) it won’t do that.

Also you should let us know what actually happens when you try to collide them. 🙂 There are different things to worry about depending on if they just go through each other, they do collide but there’s no event, et cetera!

Let us know! 🙂

---

<div class="post-metadata">

**Author:** ![markelo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@markelo](https://forums.unrealengine.com/u/markelo)\
**Post date:** [March 30, 2025, 1:56pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/3 "2025-03-30T13:56:40Z")

</div>

Hello and sorry for the late reply,

I have every collision in my world set to Block All, the car, the buildings, the trees, everything.

What happens is that the car collides with the buildings and the trees normally, however the on Component Hit node never triggers, so the game never pauses.  
since i am using the City Samples Vehicles blueprints i saw that they had no collision boxes in their meshes, but adding them changed nothing.  
Generating the Trees and the buildings through PCG plays any role?

Thank you

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [March 31, 2025, 5:06pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/4 "2025-03-31T17:06:04Z")

</div>

> [@markelo](#):
>
> Generating the Trees and the buildings through PCG plays any role?

Actually, that is something to look into.

Can you make just one simple static mesh to test it against, using a static mesh from your PCG stuff? I haven’t used PCG a lot but I do know that it’s likely to cause collision events to be weird.

---

<div class="post-metadata">

**Author:** ![markelo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@markelo](https://forums.unrealengine.com/u/markelo)\
**Post date:** [March 31, 2025, 6:26pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/5 "2025-03-31T18:26:33Z")

</div>

> [@Mind-Brain](#):
>
> n you make just one simple static mesh to test it against

Just tested the collision to a single static mesh. i also made the pcg to spawn the building as actors (BP\_Building blueprint i created) which was suggested as a solution by chatgpt. However, nothing worked and the event never triggers although the car collides normally.

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [March 31, 2025, 7:04pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/6 "2025-03-31T19:04:37Z")

</div>

I notice you’re using on component hit (mesh)

Are there any OTHER collisions that you might have? Can you show your hierarchy on the car actor? It might be that another collider is blocking the mesh itself from having a hit reaction.

---

<div class="post-metadata">

**Author:** ![markelo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@markelo](https://forums.unrealengine.com/u/markelo)\
**Post date:** [March 31, 2025, 7:14pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/7 "2025-03-31T19:14:17Z")

</div>

![Screenshot_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/5/23512784e9adf546d0a9ec7ef102d6b5f36cab69.png)

this is the the car

---

<div class="post-metadata">

**Author:** ![markelo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@markelo](https://forums.unrealengine.com/u/markelo)\
**Post date:** [March 31, 2025, 8:53pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/8 "2025-03-31T20:53:15Z")

</div>

OK so Update.

I got it working.

The problem seemed to be with the ‘On Component Hit’ node. i changed it to ‘On Component begin Overlap’ and it started working.

 ![Screenshot_3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/9/8993483ff4dbe103e3e26f5151007ac1b2a74c35.png)

Screenshot form my Car blueprint

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [April 30, 2025, 8:53pm UTC](https://forums.unrealengine.com/t/on-component-hit-not-working/2424261/9 "2025-04-30T20:53:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
