OnOverlapBegin is called before PlayerController is intialized

Hi,

I am using OnOverlapBegin and End. I use AddDynamic to bind my function to OnActorBegin/End/Overlap.
I do the binding inside of the PostInitializeComponents function so it’s done at game start.

This all works fine while playing the game and running in and out of my AVolumes that I placed in the level.

The problem is that when I spawn inside of this volume, OnOverlapBegin is called before the PlayerController is initialized.

I cast to AMyGameCharacter and afterwards to AMyGamePlayerController (with proper checking, of course) to get needed information from this actor. The Character is valid, but the PlayerController is null.

How can I solve this?

Thank you

bump Anyone?

I solved it by calling SetActorEnableCollision(false); when constructing the Pawn, and then enabling collisions again after the PlayerController has been possessed by the Pawn.

Your Mesh on your PlayerCharacter is probably colliding with the Capsule Component (or collision mesh) on the the same object.