Skip to content
Snippets Groups Projects
Commit db15a51d authored by Sebastian Pape's avatar Sebastian Pape
Browse files

Changed HMD mode check + enabled flying

parent 8209a767
No related branches found
No related tags found
1 merge request!4Develop
......@@ -133,16 +133,18 @@ void ACAVEOverlayController::BeginPlay()
{
Super::BeginPlay();
if (hmd_mode_ || !display_cluster_mode_) return; // Not our business
//Read situation
hmd_mode_ = GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed();
display_cluster_mode_ = IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster;
//TODO: Remove. Only Debugging
UE_LOG(CAVEOverlayLog, Log, TEXT("HMD: %d, DisplayCluster %d"), hmd_mode_, display_cluster_mode_);
if ((hmd_mode_ && !display_cluster_mode_) || !display_cluster_mode_) return; // Not our business
//Actor config
InputComponent->BindAction("DisplayClusterAction1", EInputEvent::IE_Pressed, this, &ACAVEOverlayController::CycleDoorType);
InputComponent->BindKey(EKeys::F10, EInputEvent::IE_Pressed, this, &ACAVEOverlayController::CycleDoorType);
//Read situation
hmd_mode_ = GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed();
display_cluster_mode_ = IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster;
//Determine the screentype for later usage
if (IDisplayCluster::Get().GetClusterMgr()->GetNodeId().Equals(screen_main, ESearchCase::IgnoreCase)) {
screen_type_ = SCREEN_MASTER;
......@@ -189,7 +191,7 @@ void ACAVEOverlayController::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
if (hmd_mode_ || !display_cluster_mode_) return; // Not our business
if ((hmd_mode_ && !display_cluster_mode_) || !display_cluster_mode_) return; // Not our business
refreshPawnComponents();
if (!cave_origin_ || !shutter_glasses_) return; //Display Cluster not initialized
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment