# OnComponentHit.AddDynamic

**URL:** <https://forums.unrealengine.com/t/oncomponenthit-adddynamic/383517>\
**Category:** World Creation\
**Tags:** error, projectile-movement, unreal-engine, projectile, question, CPP\
**Created:** [January 31, 2017, 4:25pm UTC](https://forums.unrealengine.com/t/oncomponenthit-adddynamic/383517 "2017-01-31T16:25:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![J0K3R\_12QQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J0K3R\_12QQ](https://forums.unrealengine.com/u/J0K3R_12QQ)\
**Post date:** [January 31, 2017, 4:25pm UTC](https://forums.unrealengine.com/t/oncomponenthit-adddynamic/383517/1 "2017-01-31T16:25:01Z")

</div>

Hello.  
I’m trying to make a fps game and I’m using the official (I thing) [FPS Tutorial][1] from UE Wiki.  
I made the shooting mechanic and now I’m trying to make the projectiles interact with the world. I don’t want explosion or anything, because I want to just make them kill enemies (I’ll later make a simple HP System) and destroy themselves when they hit for example a wall. So first I need a function that will be called whenever the projectile will hit something. I did everything they wrote in that tutorial but I get an error. Here’s an image:

 ![124331-error.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/3/7f3d00913d1c6729c544c37300db193f6a2f4bd5.png)

How can I fix this?

---

<div class="post-metadata">

**Author:** ![Spiris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spiris](https://forums.unrealengine.com/u/Spiris)\
**Post date:** [January 31, 2017, 4:43pm UTC](https://forums.unrealengine.com/t/oncomponenthit-adddynamic/383517/2 "2017-01-31T16:43:45Z")

</div>

You appear to be missing an argument in your function signature. The signature is declared as follows

```
DECLARE_DYNAMIC_MULTICAST_DELEGATE_FiveParams( FComponentHitSignature, UPrimitiveComponent*, HitComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, FVector, NormalImpulse, const FHitResult&, Hit );  

```

So your function signature would look like:

```
void YourFunction(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComponent, FVector NormalImpulse, const FHitResult& Hit);
```

---

<div class="post-metadata">

**Author:** ![J0K3R\_12QQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J0K3R\_12QQ](https://forums.unrealengine.com/u/J0K3R_12QQ)\
**Post date:** [January 31, 2017, 4:53pm UTC](https://forums.unrealengine.com/t/oncomponenthit-adddynamic/383517/3 "2017-01-31T16:53:29Z")

</div>

It worked! Thank you very much!

---

<div class="post-metadata">

**Author:** ![Jorcassa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jorcassa](https://forums.unrealengine.com/u/Jorcassa)\
**Post date:** [March 27, 2017, 10:09am UTC](https://forums.unrealengine.com/t/oncomponenthit-adddynamic/383517/4 "2017-03-27T10:09:38Z")

</div>

Works perfectly!! Thanks!

---

<div class="post-metadata">

**Author:** ![MauricioTenorio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MauricioTenorio](https://forums.unrealengine.com/u/MauricioTenorio)\
**Post date:** [November 25, 2023, 12:54am UTC](https://forums.unrealengine.com/t/oncomponenthit-adddynamic/383517/5 "2023-11-25T00:54:47Z")

</div>

Hello. I have a question, where did you find the function signature?
