Skip to content

Commit

Permalink
Merging final GDK for Unreal 0.12.0 release
Browse files Browse the repository at this point in the history
Release 0.12.0
  • Loading branch information
gdk-for-unreal-bot committed Feb 1, 2021
2 parents d383ce3 + ff9ef48 commit b2ba5bd
Show file tree
Hide file tree
Showing 52 changed files with 1,666 additions and 464 deletions.
2 changes: 1 addition & 1 deletion .buildkite/nightly.definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ github:
teams:
- name: Everyone
permission: BUILD_AND_READ
- name: gbu/develop/unreal
- name: gen/team/unreal
permission: MANAGE_BUILD_AND_READ
37 changes: 14 additions & 23 deletions .buildkite/nightly.steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ script_runner: &script_runner
- "machine_type=quarter"
- "permission_set=builder"
- "platform=linux"
- "queue=${CI_LINUX_BUILDER_QUEUE:-v4-2019-12-12-bk5225-daecba805768d787}"
- "queue=${CI_LINUX_BUILDER_QUEUE:-v4-20-08-12-083656-bk14222-38697241}"
- "scaler_version=2"
- "working_hours_time_zone=london"
retry:
Expand All @@ -30,27 +30,14 @@ script_runner: &script_runner
- <<: *bk_system_error
- <<: *bk_interrupted_by_signal

windows: &windows
agents:
- "agent_count=1"
- "capable_of_building=gdk-for-unreal"
- "environment=production"
- "machine_type=quad"
- "permission_set=builder"
- "platform=windows"
- "scaler_version=2"
- "queue=${CI_WINDOWS_BUILDER_QUEUE:-v4-20-03-26-102432-bk9951-8afe0ffb}"
timeout_in_minutes: 60
retry:
automatic:
- <<: *agent_transients
- <<: *bk_system_error
- <<: *bk_interrupted_by_signal
plugins:
- ca-johnson/taskkill#v4.1: ~

# NOTE: step labels turn into commit-status names like {org}/{repo}/{pipeline}/{step-label}, lower-case and hyphenated.
# These are then relied on to have stable names by other things, so once named, please beware renaming has consequences.
env:
SLACK_CHANNEL: "#unreal-gdk-builds"
GDK_REPOSITORY: "git@github.com:spatialos/UnrealGDK.git"
MAIN_MAP_NAME: "Control_Small"
SPATIAL_PROJECT_NAME: "unreal_gdk"
SPATIAL_RUNTIME_VERSION: "15.0.0" ## the runtime version of SpatialOS

steps:
- label: "generate-pipeline-steps"
Expand All @@ -64,6 +51,10 @@ steps:
- wait

- label: "slack-notify"
if: build.env("SLACK_NOTIFY") == "true" || build.branch == "master"
command: "powershell -NoProfile -NonInteractive -InputFormat Text -Command ./ci/slack-notify.ps1"
<<: *windows
if: |
build.env("NIGHTLY_BUILD") == "true" ||
build.env("SLACK_NOTIFY") == "true" ||
build.env("FIREBASE_TEST") == "true" ||
build.branch == "master"
command: "python3 ci/slack-notify.py"
<<: *script_runner
2 changes: 1 addition & 1 deletion DeployGame.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set deploymentname=%gamename%%formatdate%
cd spatial/
spatial build build-config || goto :error
spatial cloud upload %deploymentname% --force || goto :error
spatial cloud launch %deploymentname% one_worker_test.json %deploymentname% --snapshot=snapshots/default.snapshot --cluster_region=eu --runtime_version=0.4.3 || goto :error
spatial cloud launch %deploymentname% one_worker_test.json %deploymentname% --snapshot=snapshots/default.snapshot --cluster_region=eu --runtime_version=15.0.0 || goto :error
spatial project deployment tags add %deploymentname% dev_login || goto :error
spatial project deployment tags add %deploymentname% status_lobby || goto :error

Expand Down
9 changes: 4 additions & 5 deletions Game/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GlobalDefaultServerGameMode=None
ServerDefaultMap=/Game/Maps/Control_Small.Control_Small

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
MinimumiOSVersion=IOS_11
MinimumiOSVersion=IOS_12

[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Desktop
Expand All @@ -16,8 +16,6 @@ DefaultGraphicsPerformance=Maximum
AppliedDefaultGraphicsPerformance=Maximum

[/Script/Engine.RendererSettings]
r.Streaming.PoolSize=2000
r.SceneColorFormat=2
r.TemporalAACurrentFrameWeight=0.25
r.AllowStaticLighting=False
r.LightPropagationVolume = 1
Expand Down Expand Up @@ -105,7 +103,8 @@ AsyncPut=(Type=AsyncPut, Inner=Hierarchy)
Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared)
Boot=(Type=Boot, Filename=%GAMEDIR%DerivedDataCache/Boot.ddc, MaxCacheSize=256)
Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=17, FoldersToClean=-1, Path=../../../Engine/DerivedDataCache)
Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=\\mystudio.net\DDC, EnvPathOverride=UE-SharedDataCachePath)
AltShared=(Type=FileSystem, ReadOnly=true, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=\\mystudio.net\DDC2, EnvPathOverride=UE-SharedDataCachePath2)
Pak=(Type=ReadPak, Filename=%GAMEDIR%DerivedDataCache/DDC.ddp)
EnginePak=(Type=ReadPak, Filename=../../../Engine/DerivedDataCache/DDC.ddp)
; Shared DDC location setup
; Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=\\mystudio.net\DDC, EnvPathOverride=UE-SharedDataCachePath)
; AltShared=(Type=FileSystem, ReadOnly=true, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=\\mystudio.net\DDC2, EnvPathOverride=UE-SharedDataCachePath2)
64 changes: 54 additions & 10 deletions Game/Config/DefaultInput.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@

[/Script/Engine.InputSettings]
-AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
-AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
-AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
-AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
-AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
-AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
+AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
Expand Down Expand Up @@ -53,13 +47,61 @@
+AxisConfig=(AxisKeyName="SteamVR_Knuckles_Right_MiddleGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="SteamVR_Knuckles_Right_RingGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="SteamVR_Knuckles_Right_PinkyGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Daydream_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Daydream_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Daydream_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Daydream_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusGo_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusGo_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusGo_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusGo_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Touch",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
bAltEnterTogglesFullscreen=True
bF11TogglesFullscreen=True
bUseMouseForTouch=False
bEnableMouseSmoothing=True
bEnableFOVScaling=True
bCaptureMouseOnLaunch=False
bDefaultViewportMouseLock=False
bAlwaysShowTouchInterface=False
bShowConsoleOnFourFingerTap=True
bEnableGestureRecognizer=False
Expand Down Expand Up @@ -94,6 +136,10 @@ DoubleClickTime=0.200000
+ActionMappings=(ActionName="ScrollDown",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MouseScrollDown)
+ActionMappings=(ActionName="QuickToggle",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Q)
+ActionMappings=(ActionName="ToggleMode",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=X)
+ActionMappings=(ActionName="Primary",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_RightTrigger)
+ActionMappings=(ActionName="Secondary",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_LeftTrigger)
+ActionMappings=(ActionName="Crouch",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_FaceButton_Right)
+ActionMappings=(ActionName="Sprint",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_FaceButton_Top)
+AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=W)
+AxisMappings=(AxisName="MoveForward",Scale=-1.000000,Key=S)
+AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=Up)
Expand All @@ -110,9 +156,7 @@ DoubleClickTime=0.200000
+AxisMappings=(AxisName="LookUp",Scale=-1.000000,Key=MouseY)
+AxisMappings=(AxisName="MouseHorizontal",Scale=1.000000,Key=MouseX)
+AxisMappings=(AxisName="MouseVertical",Scale=1.000000,Key=MouseY)
DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks
ConsoleKey=None
-ConsoleKeys=Tilde
DefaultTouchInterface=None
+ConsoleKeys=Tilde


Binary file modified Game/Content/Blueprints/NPCs/BTTask_UnocupyPatrolPoint.uasset
Binary file not shown.
Binary file modified Game/Content/Blueprints/NPCs/BT_NPC.uasset
Binary file not shown.
Binary file modified Game/Content/Blueprints/Weapons/BP_AutomaticRifle.uasset
Binary file not shown.
Binary file modified Game/Content/Blueprints/Weapons/BP_GrenadeLauncher_Frag.uasset
Binary file not shown.
Binary file modified Game/Content/Characters/BP_FPS_Character.uasset
Binary file not shown.
Binary file modified Game/Content/Characters/BP_SimulatedPlayerCharacter.uasset
Binary file not shown.
Binary file modified Game/Content/Controllers/BP_GDK_PlayerController.uasset
Binary file not shown.
Binary file not shown.
Binary file added Game/Content/UI/TouchControls/BTN_ads.uasset
Binary file not shown.
Binary file added Game/Content/UI/TouchControls/BTN_crouch.uasset
Binary file not shown.
Binary file added Game/Content/UI/TouchControls/BTN_fire.uasset
Binary file not shown.
Binary file added Game/Content/UI/TouchControls/BTN_jump.uasset
Binary file not shown.
Binary file not shown.
Binary file added Game/Content/UI/TouchControls/BTN_movement.uasset
Binary file not shown.
Binary file added Game/Content/UI/TouchControls/BTN_sprint.uasset
Binary file not shown.
7 changes: 4 additions & 3 deletions Game/Source/GDKShooter/GDKShooter.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ public GDKShooter(ReadOnlyTargetRules Target) : base(Target)
"Slate",
"SlateCore",
"SpatialGDK",
"Json",
"HTTP",
"AIModule"
"Json",
"HTTP",
"AIModule",
"ApplicationCore"
});
}
}
5 changes: 5 additions & 0 deletions Game/Source/GDKShooter/Private/Characters/GDKCharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,8 @@ bool AGDKCharacter::CanBeSeenFrom(const FVector& ObserverLocation, FVector& OutS
OutSightStrength = (float)PositiveHits / (float)NumberOfLoSChecksPerformed;
return PositiveHits > 0;
}

void AGDKCharacter::ClientMovementReset_Implementation()
{
GetCharacterMovement()->ResetPredictionData_Server();
}
24 changes: 21 additions & 3 deletions Game/Source/GDKShooter/Private/Controllers/GDKPlayerController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,38 @@

#include "Blueprint/UserWidget.h"
#include "Camera/CameraComponent.h"
#include "Controllers/Components/ControllerEventsComponent.h"
#include "Characters/Components/EquippedComponent.h"
#include "Characters/Components/HealthComponent.h"
#include "Characters/Components/MetaDataComponent.h"
#include "Controllers/Components/ControllerEventsComponent.h"
#include "EngineClasses/SpatialNetDriver.h"
#include "Interop/Connection/SpatialWorkerConnection.h"
#include "Game/Components/PlayerPublisher.h"
#include "Game/Components/ScorePublisher.h"
#include "Game/Components/SpawnRequestPublisher.h"
#include "Game/Components/PlayerPublisher.h"
#include "GameFramework/Character.h"
#include "GameFramework/GameStateBase.h"
#include "GameFramework/PlayerState.h"
#include "GameFramework/SpringArmComponent.h"
#include "GameFramework/TouchInterface.h"
#include "Interop/Connection/SpatialWorkerConnection.h"
#include "Net/UnrealNetwork.h"
#include "UI/TouchControls.h"
#include "Weapons/Holdable.h"
#include "Weapons/Projectile.h"
#include "Weapons/Weapon.h"
#include "Widgets/Input/SVirtualJoystick.h"


AGDKPlayerController::AGDKPlayerController()
: bIgnoreActionInput(false)
, DeleteCharacterDelay(5.0f)
{
static ConstructorHelpers::FClassFinder<UTouchControls> TouchUIFinder(TEXT("/Game/UI/TouchControls/BP_TouchControls"));
if (TouchUIFinder.Class != nullptr)
{
wTouchUI = TouchUIFinder.Class;
}

// Don't automatically switch the camera view when the pawn changes, to avoid weird camera jumps when a character dies.
bAutoManageActiveCameraTarget = false;

Expand Down Expand Up @@ -63,6 +71,16 @@ void AGDKPlayerController::SetPawn(APawn* InPawn)
SetViewTarget(InPawn);
// Make the new pawn's camera this controller's camera.
this->ClientSetRotation(InPawn->GetActorRotation(), true);
if (SVirtualJoystick::ShouldDisplayTouchInterface() && wTouchUI != nullptr)
{
TouchUI = CreateWidget<UTouchControls>(this, wTouchUI);
if (TouchUI)
{
TouchUI->AddToViewport();
TouchUI->BindControls();
}
}

}
else
{
Expand Down
Loading

0 comments on commit b2ba5bd

Please sign in to comment.