OnComponentBeginOverlap triggers multiple times

Hello friends!

I have a blueprint that is handling a load/unload of levels.
You step into it, X level loads, Y unloads. It’s a bit more complex than that… but you get the idea.

I basically use **OnComponentBeginOverlap **and I use Unreal’s FirstPerson Controller.

My problem is that when I get in, somehow, not sure why… the BeginOverlap happens multiple times. During my tests I was only rotating… yet the Event was triggering.

Another weird thing… if I have the height of the colider something at 30… it’s fine. If I make it bigger. around 70 (I want to be sure that the player colides with it, and doesn’t jump over it) … the multiple trigger happens.

I had to use **DoOnce **node in order for this not to happen… so in theory I can still use it but… it’s a bit more annoying because of the extra nodes & because I have to find a way to reset it.

So, do you have any idea why the OnComponentBeginOverlap triggers multiple times? I only want it to trigger once… WHEN I GET IN :smiley:

Thank You

Maybe check what overlaps it. Character blueprint has multiple components, it may be so all of them trigger overlap event.

2 Likes

This is very possible. This is how the start of the collision checkup starts:

So in a way I am checking if I collide with the player. Any other suggestions? I just recently started to work with Unreal so there are a lot of basic stuff I don’t know yet :smiley:

Thanks

Try to check if Other component is of some class, something that is only once in component hierarchy (like collision capsule, if that can be checked by class).

I fixed it he meantime :slight_smile: I coudn’t post because of the moderating thing.

It turns out that the FirstPerson Blue Print has this 2 Spheres:
cb3083444d.png

Those 2 spheres has collision enabled … I just disabled the collision … and everything seems fine now.

I had same problems with overlap, when i entered to sphere, it did something like in → out → in → out → in even if i had DoOnce node here… I written report about this, which was submitter by Rudy as UE-30816, hovewer i tried to find it if its solved but without any results…
Try to remove everything except collision capsule from your character…

I will need to find a way to remove the gun & shooting mechanics… but for now we are having a bit of fun shooting ballz :smiley:

Each tick generates the event. For overlaps I want to happen once I go this route.

Event begin overlap–>if bIsOverlapped false–true–event–set bIsOverlapped true.
Event end overlap–>if bIsOverlapped true–true–set bIsOverlapped false.

Similar problem appeared after I attached a flashlight to First Person Character (inside its Blueprint and with switch on/off function). After I’ve rolled back all actions I did, problem persists. Then I tried to figure out which components of FPC cause 2 times triggering, but it always was same thing (projectile sphere, or gun, or mesh, depends on which side of Character overlaps trigger first), and it always triggers doubled (even with “Do Once” node).

When I changed old trigger box with the new one - triggering started to work as expected. Don’t know why new one working fine, but it’s working… And I didn’t change anything in the previous trigger box before.

But another problem is that some other kind of triggers and event dispatchers have same issue. So looks like something went wrong with Character probably… and instead of changing every (or almost every) event to new one, maybe I should change something inside FPC blueprint (or somewhere else).

Any ideas? Engine bug maybe?


P.S. So finally I get rid of it. I deleted all affected triggers and event dispatchers inside level blueprint and added them back again (fortunately I don’t have them too much at the moment).

Hello!
First post here.

I had the some problem and found a solution.
I have a Pawn with 2 components (static mesh and a sphere collision), both was checking the Event Begin Overlap with a child of another Blueprint, that’s why I had 2 checks.
One solution is to uncheck the **Generate Overlap Events **of one or more components of your Pawn or BP.

Another way (i think) is to cast to a specific component and check the overlap event between component and actor.

See ya