So, the same code is working on some assets, collisions are working, cos in blueprint the overlap works, te code on the cpp is:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Box Collision”)
BoxComponentToGrabHammer = CreateDefaultSubobject(TEXT(“Collision To Grab”));
BoxComponentToGrabHammer->SetupAttachment(StaticMesh);
BoxComponentToGrabHammer->SetGenerateOverlapEvents(true);
BoxComponentToGrabHammer->OnComponentBeginOverlap.AddDynamic(this, &AHammerC::GrabhammerBeginPlay);
void AHammerC::GrabhammerBeginPlay(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
UE_LOG(LogTemp, Warning, TEXT(“GrabHammerOverlap”));
}
In the past, just deleting the Binaries Intermediate and DerivedDataCache and rebuild worked, but this time it is not
It is not the full code on “GrabhammerBeginPlay()” so is easier to read