# \#oncomponenthit

**URL:** https://forums.unrealengine.com/tag/oncomponenthit/1668.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [OnComponentHit Function not working](https://forums.unrealengine.com/t/oncomponenthit-function-not-working/483103)

<div class="topic-metadata">

**Author:** [@11Mdp](https://forums.unrealengine.com/u/11Mdp)\
**Replies:** 7\
**Last updated:** [February 2, 2025, 9:44am UTC](https://forums.unrealengine.com/t/oncomponenthit-function-not-working/483103 "2025-02-02T09:44:14Z")

</div>

Hello, I’m having problem with the OnComponentHit activation. Basically I’ve written this code for my projectile class: And this is how the OnHit function is declared and defined: The problem is that the OnHi…

---

## [Projectile bounces off Character, but never returns any Hit events](https://forums.unrealengine.com/t/projectile-bounces-off-character-but-never-returns-any-hit-events/422459)

<div class="topic-metadata">

**Author:** [@Jay2645](https://forums.unrealengine.com/u/Jay2645)\
**Replies:** 2\
**Last updated:** [November 19, 2024, 11:16pm UTC](https://forums.unrealengine.com/t/projectile-bounces-off-character-but-never-returns-any-hit-events/422459 "2024-11-19T23:16:22Z")

</div>

I started from a blank project and currently have a Projectile actor which uses the ProjectileMovementComponent. I’ve wired up the OnHit delegate like so: You can see that I’m using both OnActorHit and OnComponentHit …

---

## [OnComponentHit Triggering Twice From One Impact](https://forums.unrealengine.com/t/oncomponenthit-triggering-twice-from-one-impact/745760)

<div class="topic-metadata">

**Author:** [@Dante5050](https://forums.unrealengine.com/u/Dante5050)\
**Replies:** 4\
**Last updated:** [January 16, 2023, 6:28pm UTC](https://forums.unrealengine.com/t/oncomponenthit-triggering-twice-from-one-impact/745760 "2023-01-16T18:28:11Z")

</div>

I’ve got a Target and Projectile class in my cpp project, with the Target handling collisions with Projectiles by detracting health based on the damage provided by the Projectile, and the Projectile deleting itself whene…

---

## [Random CRASH PhysX ComponentHit](https://forums.unrealengine.com/t/random-crash-physx-componenthit/454408)

<div class="topic-metadata">

**Author:** [@PhoeniX-Storms](https://forums.unrealengine.com/u/PhoeniX-Storms)\
**Replies:** 12\
**Last updated:** [June 10, 2022, 12:20am UTC](https://forums.unrealengine.com/t/random-crash-physx-componenthit/454408 "2022-06-10T00:20:33Z")

</div>

Hi guys, I have this random crash when moving a physics object that fires the Hit event that I use to play the impact sound. Everything works fine but sometimes it just crashes the engine. Does the same on a packaged ve…

---

## [Only Single Component Hit](https://forums.unrealengine.com/t/only-single-component-hit/487852)

<div class="topic-metadata">

**Author:** [@Mynkela](https://forums.unrealengine.com/u/Mynkela)\
**Replies:** 0\
**Last updated:** [August 23, 2021, 6:29am UTC](https://forums.unrealengine.com/t/only-single-component-hit/487852 "2021-08-23T06:29:45Z")

</div>

.h file UFUNCTION() void WhenHit(UPrimitiveComponent\* HitComp, AActor\* OtherActor, UPrimitiveComponent\* OtherComp, FVector NormalImpulse, const FHitResult& Hit); .cpp file void AMyPlayerChar::BeginPlay() { Super::Begi…

---

## [Only one OnComponentHit event is firing](https://forums.unrealengine.com/t/only-one-oncomponenthit-event-is-firing/456675)

<div class="topic-metadata">

**Author:** [@morbal](https://forums.unrealengine.com/u/morbal)\
**Replies:** 2\
**Last updated:** [October 9, 2019, 2:43pm UTC](https://forums.unrealengine.com/t/only-one-oncomponenthit-event-is-firing/456675 "2019-10-09T14:43:17Z")

</div>

i have two types of arrows which are defined and spawned in character controller as follows: character.h file: UPROPERTY(EditAnywhere,BlueprintReadWrite, Category = Projectile) TSubclassOf\<class AArrowProjectile\> Nor…

---

## [Why is the Character mesh not generating Hit Events](https://forums.unrealengine.com/t/why-is-the-character-mesh-not-generating-hit-events/283924)

<div class="topic-metadata">

**Author:** [@Albert\_Espin\_1](https://forums.unrealengine.com/u/Albert_Espin_1)\
**Replies:** 25\
**Last updated:** [November 13, 2018, 11:02pm UTC](https://forums.unrealengine.com/t/why-is-the-character-mesh-not-generating-hit-events/283924 "2018-11-13T23:02:04Z")

</div>

Hi, I have a Character and at a certain point in-game its Root CapsuleComponent’s collision is disabled and the SkeletalMeshComponent, the mesh, is set to Simulate Physics. The Mesh has blocking collision settings, Gener…

---

## [OnComponentHit event from a Skeletal Body/Bone?](https://forums.unrealengine.com/t/oncomponenthit-event-from-a-skeletal-body-bone/360977)

<div class="topic-metadata">

**Author:** [@ionbordura](https://forums.unrealengine.com/u/ionbordura)\
**Replies:** 3\
**Last updated:** [December 10, 2017, 5:54pm UTC](https://forums.unrealengine.com/t/oncomponenthit-event-from-a-skeletal-body-bone/360977 "2017-12-10T17:54:10Z")

</div>

Hi there, is it possible to get the OnComponentHit event only from a given part of a USkeletalMeshComponent (e.g left hand, right leg, finger tip of a skeleton) ? Using the Phasset tool, I can select various bodies to …

---

## [CPP VIVE Controller OnComponentHit doesn't fire](https://forums.unrealengine.com/t/cpp-vive-controller-oncomponenthit-doesnt-fire/362146)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_1aa4840c](https://forums.unrealengine.com/u/anonymous_user_1aa4840c)\
**Replies:** 1\
**Last updated:** [November 9, 2017, 7:11pm UTC](https://forums.unrealengine.com/t/cpp-vive-controller-oncomponenthit-doesnt-fire/362146 "2017-11-09T19:11:51Z")

</div>

I followed this tutorial:UE4 c++ OnComponentOverlap and OnComponentHit syntax - YouTube And used this to create a sphere that triggers hits and overlap events in my scene, this works perfectly. I then tried to apply the…

---

## [OnComponentHit from capsulecomponent](https://forums.unrealengine.com/t/oncomponenthit-from-capsulecomponent/407741)

<div class="topic-metadata">

**Author:** [@fanzypantz](https://forums.unrealengine.com/u/fanzypantz)\
**Replies:** 0\
**Last updated:** [October 23, 2017, 5:25pm UTC](https://forums.unrealengine.com/t/oncomponenthit-from-capsulecomponent/407741 "2017-10-23T17:25:22Z")

</div>

I’m trying to get the OnComponentHit from the capsulecomponent in ACharacter but I only seem to be able to do it in blueprints. This is what I have now: // PlayerCharacter.h void OnComponentHit(UPrimitiveComponent\* Hi…

---

## [Parent OnComponentHit to Attached Component](https://forums.unrealengine.com/t/parent-oncomponenthit-to-attached-component/388875)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_2b086c581](https://forums.unrealengine.com/u/anonymous_user_2b086c581)\
**Replies:** 2\
**Last updated:** [March 26, 2017, 10:37am UTC](https://forums.unrealengine.com/t/parent-oncomponenthit-to-attached-component/388875 "2017-03-26T10:37:02Z")

</div>

Does OnComponentHit also trigger hits for all attached components? Such that if my player has a sword which has a USpellEffectComponent attached and each have different on hit functions, would both be called when the par…

---

## [All animations freeze during combat](https://forums.unrealengine.com/t/all-animations-freeze-during-combat/386009)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_47b9dff7](https://forums.unrealengine.com/u/anonymous_user_47b9dff7)\
**Replies:** 9\
**Last updated:** [March 17, 2017, 1:49pm UTC](https://forums.unrealengine.com/t/all-animations-freeze-during-combat/386009 "2017-03-17T13:49:25Z")

</div>

During combat only, animations freeze if character/enemy are hit in quick succession, although X and Y ‘sliding’ movement is possible. If you use ‘stick and move’ style combat this bug does not appear. But if character…

---

## [How to use "Actor Has Tag" node?](https://forums.unrealengine.com/t/how-to-use-actor-has-tag-node/361680)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_9baf38ec1](https://forums.unrealengine.com/u/anonymous_user_9baf38ec1)\
**Replies:** 4\
**Last updated:** [January 2, 2017, 1:53pm UTC](https://forums.unrealengine.com/t/how-to-use-actor-has-tag-node/361680 "2017-01-02T13:53:46Z")

</div>

Hey, I am studying on a tank project and i cannot seem to get Actor Has Tag node working. On hit first print string on the left side works as intended. Prints the object’s name on the screen. However for the branch part…

---

## [Cannot bind OnComponentHit](https://forums.unrealengine.com/t/cannot-bind-oncomponenthit/358625)

<div class="topic-metadata">

**Author:** [@cridia](https://forums.unrealengine.com/u/cridia)\
**Replies:** 3\
**Last updated:** [September 13, 2016, 6:00am UTC](https://forums.unrealengine.com/t/cannot-bind-oncomponenthit/358625 "2016-09-13T06:00:45Z")

</div>

I am having a bit of a problem binding OnComponentHit to one of my capsule components. The problem is that the implementation worked before and when I cleaned up the class (moving some variables around to make it more re…

---

## [OnComponentHit stopped working after renaming delagate function](https://forums.unrealengine.com/t/oncomponenthit-stopped-working-after-renaming-delagate-function/368653)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_44ea4ec1](https://forums.unrealengine.com/u/anonymous_user_44ea4ec1)\
**Replies:** 0\
**Last updated:** [August 29, 2016, 5:06pm UTC](https://forums.unrealengine.com/t/oncomponenthit-stopped-working-after-renaming-delagate-function/368653 "2016-08-29T17:06:54Z")

</div>

Initially this code was working from constructor of a class derived from ACharacter: auto capsule = GetCapsuleComponent(); capsule-\>OnComponentHit.AddDynamic(this, &APhageCharacter::onHit); capsule-\>BodyInstance.SetResp…

---

## [Make ACharacter bounce off the walls. Multiple OnComponentHit events problem](https://forums.unrealengine.com/t/make-acharacter-bounce-off-the-walls-multiple-oncomponenthit-events-problem/364857)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_44ea4ec1](https://forums.unrealengine.com/u/anonymous_user_44ea4ec1)\
**Replies:** 2\
**Last updated:** [July 23, 2016, 2:41pm UTC](https://forums.unrealengine.com/t/make-acharacter-bounce-off-the-walls-multiple-oncomponenthit-events-problem/364857 "2016-07-23T14:41:57Z")

</div>

Hi, There is a player actor inherited from ACharacter. Player navigates the maze some parts of wich supposed to have zero gravity. So I set BrakingDecelerationWalking = 0 and BrakingFrictionFactor = 0 on CharacterMoveme…

---

## [Hit don't register with skeletal mesh](https://forums.unrealengine.com/t/hit-dont-register-with-skeletal-mesh/361427)

<div class="topic-metadata">

**Author:** [@FabienT](https://forums.unrealengine.com/u/FabienT)\
**Replies:** 0\
**Last updated:** [June 20, 2016, 1:38pm UTC](https://forums.unrealengine.com/t/hit-dont-register-with-skeletal-mesh/361427 "2016-06-20T13:38:36Z")

</div>

Hello, As a preface, i am very new to UE4 and currently learning mostly from scratch, i started about 3 weeks ago. I am currently creating a VR sword game using the infinity blade assets. I started by using the FPS te…

---

## [Difficulty getting OnComponentHit method to fire - C++](https://forums.unrealengine.com/t/difficulty-getting-oncomponenthit-method-to-fire-c/351133)

<div class="topic-metadata">

**Author:** [@CosmosD](https://forums.unrealengine.com/u/CosmosD)\
**Replies:** 16\
**Last updated:** [April 25, 2016, 1:48pm UTC](https://forums.unrealengine.com/t/difficulty-getting-oncomponenthit-method-to-fire-c/351133 "2016-04-25T13:48:47Z")

</div>

I am having some difficulty getting my collision event to fire. I create a collision component dynamically in the constructor of the a class and set it as the root component. I then attach a static mesh to the root compo…

---

## [OnComponentHit Hit Location Bug](https://forums.unrealengine.com/t/oncomponenthit-hit-location-bug/352888)

<div class="topic-metadata">

**Author:** [@Davision](https://forums.unrealengine.com/u/Davision)\
**Replies:** 0\
**Last updated:** [April 4, 2016, 2:19pm UTC](https://forums.unrealengine.com/t/oncomponenthit-hit-location-bug/352888 "2016-04-04T14:19:40Z")

</div>

Both Impact Location and Location of a OnComponentHit of a component that is physic simulated and relatively fast gives wrong results. The hit location is always off from what would is clearly the first impact/overlap lo…

---

## [CharacterBP OnComponentHit fire event at copy-source instances](https://forums.unrealengine.com/t/characterbp-oncomponenthit-fire-event-at-copy-source-instances/349033)

<div class="topic-metadata">

**Author:** [@MSHUNSUKE](https://forums.unrealengine.com/u/MSHUNSUKE)\
**Replies:** 2\
**Last updated:** [March 2, 2016, 5:31am UTC](https://forums.unrealengine.com/t/characterbp-oncomponenthit-fire-event-at-copy-source-instances/349033 "2016-03-02T05:31:14Z")

</div>

UE 4.10.4, 4.9.2 I’ve found some strange behavior where Character component events will fire for all instances of that character blueprint class. Sample project is attached to this post. Test level is based on Default…

---

## [Building a Pawn who moves and collides](https://forums.unrealengine.com/t/building-a-pawn-who-moves-and-collides/346640)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_36b471fa](https://forums.unrealengine.com/u/anonymous_user_36b471fa)\
**Replies:** 2\
**Last updated:** [February 6, 2016, 11:23pm UTC](https://forums.unrealengine.com/t/building-a-pawn-who-moves-and-collides/346640 "2016-02-06T23:23:15Z")

</div>

Hello, I’ve been struggling with building a simple enemy Pawn BP that moves around and collides with things, including the ability to fall. I have finally proven that my setup using SetActorLocation + “Sweep” is gettin…

---

## [Movement and Collision Issue](https://forums.unrealengine.com/t/movement-and-collision-issue/346001)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_36b471fa](https://forums.unrealengine.com/u/anonymous_user_36b471fa)\
**Replies:** 0\
**Last updated:** [February 1, 2016, 3:38am UTC](https://forums.unrealengine.com/t/movement-and-collision-issue/346001 "2016-02-01T03:38:56Z")

</div>

Hello, I’ve been working through a few different directions when it comes to make a “goomba” style character in a sidescrolling 3D game. My goal is simple, make an enemy move back and forth between two trigger volumes.…

---

## [Function when actor collides](https://forums.unrealengine.com/t/function-when-actor-collides/301413)

<div class="topic-metadata">

**Author:** [@Shrimperator](https://forums.unrealengine.com/u/Shrimperator)\
**Replies:** 4\
**Last updated:** [December 13, 2014, 1:08am UTC](https://forums.unrealengine.com/t/function-when-actor-collides/301413 "2014-12-13T01:08:13Z")

</div>

For a projectile, I need to get whenever my projectile hits any other object. Fist I tried to use MeshComponent-\>OnComponentHit.AddDynamic(this, &AProjectile::OnHit); Unfortunately this is extremely unreliably (It onl…

---

## [OnComponentHit not fired if Character is moved slowly](https://forums.unrealengine.com/t/oncomponenthit-not-fired-if-character-is-moved-slowly/291232)

<div class="topic-metadata">

**Author:** [@LBandy](https://forums.unrealengine.com/u/LBandy)\
**Replies:** 10\
**Last updated:** [August 19, 2014, 9:13am UTC](https://forums.unrealengine.com/t/oncomponenthit-not-fired-if-character-is-moved-slowly/291232 "2014-08-19T09:13:51Z")

</div>

I have correctly set up my Character in the following way: CapsuleComponent-\>OnComponentHit.AddDynamic(this, &AMyCharacter::onHit); And added the method: void AMyCharacter::onHit(AActor\* OtherActor, UPrimitiveComponen…
