Overlap events fired twice

Hi, I am a bit stuck with this. Well it is more annoying than blocking. Every time the character steps on the pressure pad, the “Activated” message is fired twice.
Same when he steps away, the deactivated message is fired twice.First I was trying to register the event in the constructor but I had to put it in beginPlay because it wasn’t working. I kinda feel like it’s something happening in the Editor as I have double checked my code compared to yours but I don’t know what’s amiss. If anyone has a clue what’s going on, please feel free to share.
Thanks guys


If you don’t register in the C++, does that remove both events? Have you fully restarted the editor since moving away from the constructor. This stuff can easily get cached.

Yes I have commented out the line that registers the OnComponentBeginOverlap event and it removes both events. And yes I have restarted Editor today and I have no overlap begin event and two overlap end events, which were not commented out. I then uncommented the line and now I have the two messages back. So I don’t think the cache is the culprit. I was thinking somehow twi parts of the trigger emitted an overlap event at once or the player generates the event twice…

I added other actor and component to the UE_LOG and the same actor and the trigger volume gernerate the collision each time.

So still an issue?

The below is tested on: Unreal engine Version: 4.18.1-3754814+++UE4+Release-4.18
IF you are certain your code is correct you could try the stupid “solution” below:

I had the same issue, with sometimes events even firing 4 times.
Strangely enough the deactivate event that was exactly the same as the activate event only fired once as it should.

Perhaps even more strangely after several project resets (closing and then reopening the project) it eventually just started working properly (this took multiple restarts because at first this didn’t do anything).

The code remained untouched and I didn’t change a thing.
So you might get it working by just restarting your project a few times, perhaps when you close it you remove the BP’s in the level first and reopen your project and place them back?

It’s likely something cached in the editor. Restarts and total recompiles always help in such cases.

If you have X players the Log will be fired X times, but the event is fired only once, I think the logs are separated for each player. Props to someone in the Q&A who posted that.

1 Like

For wut i did is:

  • use AddUniqueDynamic instead
  • put these into the “beginplay”

I wasn’t able to get the AddUniqueDynamic working. But, if I put a HasAuthority() check in the overlap event It only prints once now.

Going through the multiplayer course and searching from Google came across this post on this same lesson. Brought the number of players down to 1 and it worked as expected. Thanks for posting this - I hadn’t looked in the Q&A yet. Thanks - you saved me a bunch of time. Now I need to experiment to figure out how to include the client name / info in the log to make the log source more clear. :slight_smile:

I have the same issue and I’ve encountered it before in other contexts. I’m on UE4 4.25.3. This issue relates to connecting the platforms to the triggers on the Unreal Multiplayer Master course, section 1.16. In this case, when I walk into the platform trigger two overlap events are fired causing the implementation used in the lesson to not work as the active trigger count always increments by 2, but decrements by 1. Here are a few odd things I’m finding:
-Putting the initialization (TriggerVolume->OnComponentEndOverlap.AddDynamic) in BeginPlay causes the game to take quite a while longer to load when playing in editor.
-I logged some variables to see if the issue was being caused by both the collision cylinder and the mesh overlapping, but that does not APPEAR to be the case:
LogTemp: : Activated
LogTemp: : Plus - Active Triggers: 1
LogTemp: : Overlapped Other Actor: ThirdPersonCharacter_2
LogTemp: : Overlapped Other Component: CollisionCylinder
LogTemp: : Activated
LogTemp: : Plus - Active Triggers: 2
LogTemp: : Overlapped Other Actor: ThirdPersonCharacter_2
LogTemp: : Overlapped Other Component: CollisionCylinder
-I tried doing a HasAuthority check and I’m playing with 1 player, but it still generates two overlap events.
-AddUniqueDynamic did “fix” the issue, but it still bugs me and I’d like to know what’s going on. I’m also really bothered by the fact that OnComponentBeginOverlap has no meaningful documentation, other than the odd little coding tutorial blurb which is surprisingly hard to get to pop up on Google.

Also, putting
TriggerVolume->OnComponentBeginOverlap.AddDynamic(this, &APlatformTrigger::OnOverlapBegin);
TriggerVolume->OnComponentEndOverlap.AddDynamic(this, &APlatformTrigger::OnOverlapEnd);
in the constructor instead fixes the double overlaps, but then EndOverlap doesn’t work.