Hello, maybe I wrong understand meaning of how should work SetActive on UPaperSpriteComponent, but why this code doesn’t deactivate my ledge actor?
void ALedgeActor::OnLedgeBeginOverlap(class AActor* another, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
GetWorldTimerManager().SetTimer(UnusedHandle, this, &ALedgeActor::UnActiveLedge, 1.0f, true);
}
void ALedgeActor::OnLedgeEndOverlap(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
{
GetRenderComponent()->SetVisibility(true);
GetRenderComponent()->SetActive(true);
GetWorldTimerManager().ClearTimer(UnusedHandle);
}
void ALedgeActor::UnActiveLedge()
{
GetRenderComponent()->SetVisibility(false);
GetRenderComponent()->SetActive(false);
GetWorldTimerManager().ClearTimer(UnusedHandle);
}
It’s hide it, but still collide, like this: