# OnComponentBeginOverlap fires only once

**URL:** <https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547>\
**Category:** Blueprint\
**Tags:** oncomponentbeginover, unreal-engine, Blueprint, question\
**Created:** [September 17, 2015, 4:55pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547 "2015-09-17T16:55:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_88b39926](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_88b39926](https://forums.unrealengine.com/u/anonymous_user_88b39926)\
**Post date:** [September 17, 2015, 4:55pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/1 "2015-09-17T16:55:28Z")

</div>

hello, i’m working on Flying template, UE 4.8.3, and i’m having kinda weird issue with “OnComponentBeginOverlap”

the “OnComponentBeginOverlap” fires only once (just one time) when the player controlled flyingPawn (the jet) enteres the sphere collider,

![59050-oncomponentbeginoverlap.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/3/ac3a6478a25a699f29bb34c771d0809524fdcf79.png)

this is how the hierarchy looks like

![59052-brdm_hierarchy.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/a/51a573a7963a5dd715dde93bee789e7242de9d72.png)

i had to make the blueprint class of type “Pawn” though i could change the “AI Controller Class” in future

 ![59054-why_to_use_pawn.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/4/794d9c48637265be512d63a02febf8937e00e8bd.png)

besides, the “ **Collision presets** ” for “ **BRDM\_Sphere\_Collider** ” is “ **OverlapAllDynamic** ”,  
and the “ **Generate Overlap Events** ” is checked .

so what’s the problem, and how to solve it ?!

thanks.

* * *

update :  
the intended behavior is as follows :  
whenever the jet fighter which is of class type “Flaying Pawn”, enters the sphere collision area(which is a child component of Pawn class type) as shown here

![59052-brdm_hierarchy.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/a/51a573a7963a5dd715dde93bee789e7242de9d72.png)

the “OnComponentBeginOverlap” of the sphere collision component, should keep executing while the jet fighter is still inside the sphere collision area (inside the bounds), but what happens is that it executes just one time, exactly when the jet fighter enters the sphere area, and stops executing while the jet is moving inside the sphere bounds

* * *

besides, i’m using the same blueprint graph but on a parent class type of “StaticMeshActor” as the next picture shows, and it works perfectly and the “OnComponentBeginOverlap” keeps executing while jet fighter is inside the sphere collision bounds

![59305-works_perfectly_on_staticmeshactor.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/c/f5c63b42855b1f5a692a447a37b828c12066926d.png)

**so the problem is not the further code attached to “OnComponentBeginOverlap”, but the execution behavior of “OnComponentBeginOverlap” itself.**

also i’m sure that the “Collision presets” are configured correctly & the “Generate Overlap Events” flag is checked .  
**so i guess it is all about the parent class type, and the hierarchy of its child components .**

any help or suggestions please ?!

hope it’s not a bug.

thanks .

---

<div class="post-metadata">

**Author:** ![Nsomnia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nsomnia](https://forums.unrealengine.com/u/Nsomnia)\
**Post date:** [September 17, 2015, 5:26pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/2 "2015-09-17T17:26:50Z")

</div>

We need more info, can you post the logic you have tied into OnBeginOverlaap and OnEndOVerlap ? It should fire everytime you enter, exit, and then reenter it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_88b39926](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_88b39926](https://forums.unrealengine.com/u/anonymous_user_88b39926)\
**Post date:** [September 19, 2015, 10:24am UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/3 "2015-09-19T10:24:10Z")

</div>

hello @Nsomnia, iv’e posted some further updates, could you read them please, and if any further specific information needed just let me now please, thanks .

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef23e124](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef23e124](https://forums.unrealengine.com/u/anonymous_user_ef23e124)\
**Post date:** [September 20, 2015, 11:03am UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/4 "2015-09-20T11:03:12Z")

</div>

It looks to me like, the OnBeginOverlap is working correctly, it will fire exactly one time, per “contact”.

Two objects A and B, both set to generate overlap events, like you have them set up, or it wouldn’t work at all.

When either A or B, contacts each other, the event will be fired, as soon as A or B, exit the overlap “area”, then the event becomes “re-armed” again, to fire, should A or B contact.

To keep something going on continuously, you need to remember, the overlap event, and then turn off remembering when you get an OverlapEnd event, or that A or B check per tick (or some interval), with a Get AllOverlappngActors node, and the equivalent for Components if you care about that.

Just a thought, have a great day!

---

<div class="post-metadata">

**Author:** ![Lazarus5000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lazarus5000](https://forums.unrealengine.com/u/Lazarus5000)\
**Post date:** [September 20, 2015, 12:30pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/5 "2015-09-20T12:30:46Z")

</div>

The OnBeginOverlap is working correctly, as the name says: it will fire when the overlapping _begins_. If the two objects stop overlapping the OnEndOverlap event will fire. That’s why i recommend using a boolean variable to store if the objects are still overlapping:

This is my basic setup:

![59430-components.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/5/255b704f9e36337b50844265d37b6111828e1245.png)

![59431-variables.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/e/7/8e7fa530cf97737d28303aa84ae79a1131cf96fa.png)

And the blueprint:

 ![59432-blueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/6/ab6edd3dea4659b0ed34287a87e715b16a7d3ccc.png)

Hope this helps you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_88b39926](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_88b39926](https://forums.unrealengine.com/u/anonymous_user_88b39926)\
**Post date:** [September 20, 2015, 9:03pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/6 "2015-09-20T21:03:03Z")

</div>

thanks, but the thing is that I’ve tried something like that, and didn’t work, but the weird thing is that the same blueprint works perfectly on the other setup, class type “StaticMeshActor” as mentioned before, so i guess it’s about the parent class type, and the hierarchy of its child components .  
thanks, appreciate it.

![59305-works_perfectly_on_staticmeshactor.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/c/f5c63b42855b1f5a692a447a37b828c12066926d.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_88b39926](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_88b39926](https://forums.unrealengine.com/u/anonymous_user_88b39926)\
**Post date:** [September 20, 2015, 9:12pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/7 "2015-09-20T21:12:06Z")

</div>

yeah @Lazarus5000 actually this is what i’m trying to do, and this is how my blueprint works, but the OnComponentBeginOverlap only fires one time, in the other setup for class type “StaticMeshActor” the OnComponentBeginOverlap fires continuously as long as the jet is inside the sphere, and once it gets outside, the OnComponentEndOverlap fires and sets the flag to false, so all of this is not working with the class type “Pawn” cz the OnComponentBeginOverlap is not firing continuously.

thanks .

![59305-works_perfectly_on_staticmeshactor.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/c/f5c63b42855b1f5a692a447a37b828c12066926d.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef23e124](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef23e124](https://forums.unrealengine.com/u/anonymous_user_ef23e124)\
**Post date:** [September 20, 2015, 9:30pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/8 "2015-09-20T21:30:44Z")

</div>

The staticmeshactor is probably firing, because, the Jet is moving, or I’m assuming it’s moving. The Box, Sphere, Capsule Collision objects, do work differently, and the “Sphere” in this case, will need to look for what is overlapping it, The Box, Sphere and Capsule, are being derived from the Primitive Component class. That can easily be done on a per tick basis (or use a divisor, if you don’t want it per tick), when the tick fires, just do a Get all overlapping actors, filter it to your needs, and get on with getting on!

Have a great day.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef23e124](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef23e124](https://forums.unrealengine.com/u/anonymous_user_ef23e124)\
**Post date:** [September 20, 2015, 9:32pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/9 "2015-09-20T21:32:09Z")

</div>

Oh yes, forgot this, a fantastic link to the classes, how often it’s updated, etc, I have no idea! lol

> **[Classes](https://docs.unrealengine.com/5.1/en-US/API/Classes/)**
>
> All classes

---

<div class="post-metadata">

**Author:** ![Lazarus5000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lazarus5000](https://forums.unrealengine.com/u/Lazarus5000)\
**Post date:** [September 20, 2015, 11:20pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/10 "2015-09-20T23:20:07Z")

</div>

Hi again ammarov,

i am sorry but i am not getting your error reproduced. I set up 2 blueprints (1 pawn, 1 static mesh actor) the same way as you did, each of them has a collision sphere:

![59488-pawn+setup.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/7/7f79368e0b149d48037383d41816990d621aee24.png)

![59489-mesh+setup.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/9/d49820212cfaa33576cf17537de711e479bafc9a.png)

This is the setup for the pawn blueprint (the static mesh actor is the same, replacing the “Pawn” with “Mesh” in the message.

![59490-blueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/f/7ffaf05d5e65e645cde327c8866159b66d6adf32.png)

In the next images the instanced right blueprint is the static mesh actor, the left one is the pawn.

Colliding with the collision sphere of the static mesh actor displays the desired text exactly one time, movement while still overlapping does not generate more printed messages… leaving the collision sphere also just prints one text message:

![59501-begin+overlap+mesh.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/b/53b6a3c27bfc467e04383d4a282ebf5b83946492.png)

![59502-end+overlap+mesh.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/c/eecfe3636fc07a7855ab892daecb4a263d8c7d3c.png)

Exactly the same with the pawn blueprint (with changed messages). I reached my image limit for the post but it is the same, just replace the “Mesh” with “Pawn” in the printed messages.

The collision sphere is working as intended, try to reproduce the ‘bug’ leaving out other components (the destructible) and the logic that you execute after the events to further isolate the problem. If it works as it should something is wrong with one or both of these.

My guess is that your blueprint logic is causing it since the Static Mesh Actor Blueprint has no destructible but is the one that is acting in a weird way.

Anyways, that is all we can do without more details and/or screenshots.

---

<div class="post-metadata">

**Author:** ![Lazarus5000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lazarus5000](https://forums.unrealengine.com/u/Lazarus5000)\
**Post date:** [October 19, 2015, 12:13pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/11 "2015-10-19T12:13:36Z")

</div>

Hey @ammarov,

are you still struggling with the problem or is there anything else we can do to help?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_88b39926](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_88b39926](https://forums.unrealengine.com/u/anonymous_user_88b39926)\
**Post date:** [October 31, 2015, 12:18pm UTC](https://forums.unrealengine.com/t/oncomponentbeginoverlap-fires-only-once/332547/12 "2015-10-31T12:18:41Z")

</div>

hello, actually no, I’ve found my way out, but i can’t mark any of the answers as correct, so if it’s necessary, i will delete this question.

and sorry for my late reply.  
thanks.
