UE 4.19 GetOwner() is returning the GameMode not the Pawn

LogTemp: Error: Unable to get physics handle for: BuildingEscapeGameModeBase_BP_C_0

PhysicsHandle = GetOwner()->FindComponentByClass();
if (!PhysicsHandle) {
UE_LOG(LogTemp, Error, TEXT(“Unable to get physics handle for: %s”),*(GetOwner()->GetName()))
}

I hate markdown…

PhysicsHandle = GetOwner()->FindComponentByClass<UPhysicsHandleComponent>();

if (!PhysicsHandle) {
UE_LOG(LogTemp, Error, TEXT(“Unable to get physics handle for: %s”),*GetOwner()->GetName())
}

Found!!! It turns out I had a grabber class in my CustomGameMode_BP, no clue how it got there but it was overriding the one in my Pawn_BP.

1 Like

Privacy & Terms