Skip to content

Crash when doing "Simulate" #15

Open
@Dalai-

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions