OnComponentEndOverlap not called
I created a AGhostActor (AActor) in C++ and registered for OnComponentBeginOverlap and OnComponentEndOverlap events:
I also set "Generate Overlap Events" Flag on an Cube (StaticMesh) in my level (Level was generated by the C++ TopDownExample). The OnComponentBeginOverlap event is calling correctly. But I never got a OnComponeneEndOverlap event. So I checked the source file PrimitiveComponent.cpp. If I'm right, the method UPrimitiveComponent::EndComponentOverlap is responsible for creating the end overlap event for components. There is a check if other actor exists (see if (OtherActor)) and only then the event will be fired. And for my case, where I'm trying to get this event for staticmesh (has no actor as parent) and a actor, I never got the end overlapping event bcuase the staticmesh do not have a actor as parent. For me it looks like a bug. But maybe I'm doing anything false. So maybe someone can help me with my issue.
I also check this https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Components/UPrimitiveComponent/OnComponentEndOverlap/index.html and some other users question and couldn't find a answer.
Thank you in advance
asked Oct 29 '17 at 04:03 PM in C++ Programming
Can you try closing the editor when you recompile your project and opening it once your project is finished building? It may be a hot reload issue. The other work around I have used for overlap notifications is to add then in BeginPlay instead of in the constructor.
answered Jul 18 '18 at 04:36 PMBrian Johnstone (suspended)
Follow this question
Once you sign in you will be able to subscribe for any updates here