Open
Description
This piece of code crashes if you do "Simulate", since the player controller doesn't have a pawn. That if (pc)
line needs to be if (pc && pc->GetPawn())
bool ASVONVolume::Generate()
{
#if WITH_EDITOR
// Needed for debug rendering
GetWorld()->PersistentLineBatcher->SetComponentTickEnabled(false);
// If we're running the game, use the first player controller position for debugging
APlayerController* pc = GetWorld()->GetFirstPlayerController();
if (pc)
{
myDebugPosition = pc->GetPawn()->GetActorLocation();
}
Metadata
Assignees
Labels
No labels