11#include "Kismet/GameplayStatics.h"
15 PrimaryActorTick.bCanEverTick =
false;
16 SensorsManager = CreateDefaultSubobject<USensorsManagerComponent>(TEXT(
"SensorsManagerComp"));
40 bool WasPossessed =
false;
45 APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0);
49 PlayerController->Possess(
Vehicle);
62 APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0);
69 PlayerController->Possess(Spectator);
TObjectPtr< AVehicle > ManuallyControlledVehicle
ESimulationPhase SimulationPhase
bool TakeManualControlOfVehicle(AVehicle *Vehicle)
virtual void BeginPlay() override
void SetSimulationPhase(ESimulationPhase newPhase)
FSimulationStateChanged OnSimulationStateChanged
TObjectPtr< USensorsManagerComponent > SensorsManager
ASimulationLevelManager()
void CeaseManualControlOfVehicle()
ESimulationState SimulationState
void SetSimulationState(ESimulationState newState)
FSimulationPhaseChanged OnSimulationPhaseChanged
static ASpectator * GetSpectator(const UObject *WorldContextObject)