What happens here is that both objects collide with each other continously. To fix that you could try to deactive the OnOverlap()
-Event on either the overlapping Object or the colliding object.
In blueprints you can achieve that by setting the Generate Overlap Events
-Variable of one of the colliding static meshes of the overlapping objects to false
.
In C++ you could simply remove the dynamic event callback for one of the colliding objects like that:
CollidingComponent->OnComponentBeginOverlap.RemoveDynamic(this, &ACollidingActor::OnBeginOverlap);
Where CollidingComponent
is the component of your object, which causes the overlap event to trigger.