OnBeginOverlap doesnt work

void ARasenmaeher::OnBeginOverlap(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
if (OtherActor->ActorHasTag(“BoxCollision”))
{
UE_LOG(LogTemp, Warning, TEXT(“Overlap”));
IsOverlapping = true;
while (IsOverlapping == true)
{
AngryLevel += 0.5f;
}

	}
}

  1. Did you mark your OnBeginOverlap() function as UFUNCTION() in .h file?
  2. Sometimes there’s some kind of a bug where overlap events don’t fire if collision is set to Query Only, but do fire if it’s set to Query and Physics. You can try it, maybe it will help.

You want to overlap with what ? Player Character or something else ?

BTW, I think the While loop will hang your engine if you use it like this. Once you overlap with the volume, it will start an infinite loop and you won’t ever be able to leave the volume for the EndOverlap function to fire.

Use a timer instead, so that the AngryLevel would increase with the same rate across all systems. Or you can increase it on Tick with account of DeltaTime. But in any case, a While loop is not the way to go here.