If i have a static mesh and I want to detect a collision between the static mesh and the character, how do I do it without making a trigger box (UBoxComponent) that surrounds the mesh ?
I’ve tried this so far and it does not seem to fire the collision event
UStaticMeshComponent* SM_Door;
.....
SM_Door->bGenerateOverlapEvents = true;
SM_Door->OnComponentBeginOverlap.AddDynamic(this, &ADoor::BeginDoorCollision);
SM_Door->OnComponentEndOverlap.AddDynamic(this, &ADoor::EndDoorCollision);
void ADoor::BeginDoorCollision(class UPrimitiveComponent* HitComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool FromSweep, const FHitResult& SweepResult)
{
// print if any collision has occured
....
}
To be clear, I want to detect collision between the collision box of the static mesh and the capsule component of the player character. Is this even possible ?