I’m building a 2D game with Paper2D. My Pawn has a UPaperFlipbookComponent set up in the constructor:
AMyPawn::AMyPawn()
{
RenderBirdFlipbookComponent = CreateDefaultSubobject<UPaperFlipbookComponent>(TEXT("Flipbook"));
RenderBirdFlipbookComponent->SetupAttachment(RootComponent);
RenderBirdFlipbookComponent->SetCollisionProfileName(TEXT("BlockAll"));
RenderBirdFlipbookComponent->SetSimulatePhysics(true);
static ConstructorHelpers::FObjectFinder<UPaperFlipbook> BirdFlipPath(
TEXT("/Script/Paper2D.PaperFlipbook'/Game/Animations/PF_RedBird.PF_RedBird'"));
RenderBirdFlipbookComponent->SetFlipbook(BirdFlipPath.Object);
}
Spawn fails every time:
LogSpawn: Warning: SpawnActor failed because of collision at the spawn location
[X=-230.000 Y=0.000 Z=0.000] for [MyPawn]
What I’ve Tried
Here’s where it gets interesting. I isolated the variables:
| Test | Result |
|---|---|
Remove SetFlipbook |
|
Remove BlockAll |
|
Remove SimulatePhysics |
|
| All three present |
I then deleted everything from the level — no floor, no walls, nothing but a PlayerStart. Then I raised the PlayerStart to Z=132. Still fails. An empty world at Z=132 — the only physics body anywhere near that position is the Pawn’s own.
It still makes mistakes, it’s too strange