├── Config ├── DefaultEditor.ini ├── DefaultGame.ini ├── HoloLens │ └── HoloLensEngine.ini ├── DefaultEngine.ini └── DefaultInput.ini ├── .gitattributes ├── README.md ├── Source ├── NewCppTutorial │ ├── NewCppTutorial.h │ ├── NewCppTutorial.cpp │ ├── MyCollectAcceptable.cpp │ ├── NewCppTutorialGameModeBase.cpp │ ├── NewCppTutorialGameModeBase.h │ ├── MyCollectAcceptable.h │ ├── NewCppTutorial.Build.cs │ ├── XPCharacter.h │ ├── MoveComponent.h │ ├── SpawnBox.h │ ├── XPCharacter.cpp │ ├── MyCollectableActor.h │ ├── MoveComponent.cpp │ ├── MyCollectableActor.cpp │ └── SpawnBox.cpp ├── NewCppTutorial.Target.cs ├── NewCppTutorialEditor │ ├── NewCppTutorialEditor.h │ ├── MoveComponentVisualizer.h │ ├── MoveComponentVisualizer.cpp │ ├── NewCppTutorialEditor.Build.cs │ └── NewCppTutorialEditor.cpp └── NewCppTutorialEditor.Target.cs ├── Content ├── DeathCell.uasset ├── MyGameMode.uasset ├── MyStatue.uasset ├── XPSpawnBox.uasset ├── MyXPCharacter.uasset └── XPCollectActor.uasset ├── .gitignore └── NewCppTutorial.uproject /Config/DefaultEditor.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | Content/** filter=lfs diff=lfs merge=lfs -text 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SourceCode for the UE5 C++ Tutorial by Lötwig Fusel 2 | 3 | https://youtube.com/playlist?list=PL-m4pn2uJvXHL5rxdudkhqrSRM5gN43YN 4 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/NewCppTutorial.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | -------------------------------------------------------------------------------- /Content/DeathCell.uasset: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a6dd7a9c9c48521e652f8aa78cf32828ea73898f9389cdd03f281c92737a4457 3 | size 32778 4 | -------------------------------------------------------------------------------- /Content/MyGameMode.uasset: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:853527243e7ebe6e9be33b9a70501e3cd03813beb95925661894bba98ef3dd8d 3 | size 19513 4 | -------------------------------------------------------------------------------- /Content/MyStatue.uasset: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f83841b72984788213deb4134e5586dcdf7e8b967240f8201e2f7597da549fd0 3 | size 95271 4 | -------------------------------------------------------------------------------- /Content/XPSpawnBox.uasset: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e1c5619310947b843429920af2f65c94c1a1384eba65e13e05efc6d7acc00898 3 | size 32843 4 | -------------------------------------------------------------------------------- /Content/MyXPCharacter.uasset: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2ae34b024d5694eba3c3d1cd856357ecef72634e55ba6ebd77dd6f15f6f8d98d 3 | size 37021 4 | -------------------------------------------------------------------------------- /Content/XPCollectActor.uasset: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c090332392f2f647512485b957eb91aff379512c8177cb33be5a064c58c2f517 3 | size 48084 4 | -------------------------------------------------------------------------------- /Config/DefaultGame.ini: -------------------------------------------------------------------------------- 1 | 2 | [/Script/EngineSettings.GeneralProjectSettings] 3 | ProjectID=CD90A1CB4DBD29411F27B3A2A918D5E2 4 | 5 | [StartupActions] 6 | bAddPacks=True 7 | InsertPack=(PackSource="StarterContent.upack",PackName="StarterContent") 8 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/NewCppTutorial.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "NewCppTutorial.h" 4 | #include "Modules/ModuleManager.h" 5 | 6 | IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, NewCppTutorial, "NewCppTutorial" ); 7 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/MyCollectAcceptable.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "MyCollectAcceptable.h" 5 | 6 | // Add default functionality here for any IMyCollectAcceptable functions that are not pure virtual. 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # UE5 Template 2 | Binaries 3 | DerivedDataCache 4 | Intermediate 5 | Saved 6 | .vscode 7 | .vs 8 | *.VC.db 9 | *.opensdf 10 | *.opendb 11 | *.sdf 12 | *.sln 13 | *.suo 14 | *.xcodeproj 15 | *.xcworkspace 16 | 17 | # Ignore StarterContent 18 | /Content/StarterContent 19 | -------------------------------------------------------------------------------- /Source/NewCppTutorial.Target.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | public class NewCppTutorialTarget : TargetRules 7 | { 8 | public NewCppTutorialTarget( TargetInfo Target) : base(Target) 9 | { 10 | Type = TargetType.Game; 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | ExtraModuleNames.AddRange( new string[] { "NewCppTutorial" } ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/NewCppTutorialEditor/NewCppTutorialEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Engine.h" 4 | #include "Modules/ModuleInterface.h" 5 | #include "Modules/ModuleManager.h" 6 | #include "UnrealEd.h" 7 | 8 | #include "MoveComponentVisualizer.h" 9 | 10 | DECLARE_LOG_CATEGORY_EXTERN(NewCppTutorialEditor, All, All) 11 | 12 | class FNewCppTutorialEditorModule: public IModuleInterface 13 | { 14 | public: 15 | void StartupModule() override; 16 | void ShutdownModule() override; 17 | }; 18 | -------------------------------------------------------------------------------- /Source/NewCppTutorialEditor.Target.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | public class NewCppTutorialEditorTarget : TargetRules 7 | { 8 | public NewCppTutorialEditorTarget( TargetInfo Target) : base(Target) 9 | { 10 | Type = TargetType.Editor; 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | ExtraModuleNames.AddRange( new string[] { "NewCppTutorial", "NewCppTutorialEditor" } ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/NewCppTutorialGameModeBase.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | 4 | #include "NewCppTutorialGameModeBase.h" 5 | 6 | void ANewCppTutorialGameModeBase::InitGameState() 7 | { 8 | Super::InitGameState(); 9 | 10 | // Check if no hard override is active 11 | if (DefaultPawnClass == ADefaultPawn::StaticClass() || !DefaultPawnClass) 12 | { 13 | // Update to custom implementation 14 | DefaultPawnClass = CustomXPCharacterClass; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Source/NewCppTutorialEditor/MoveComponentVisualizer.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "ComponentVisualizer.h" 7 | #include "NewCppTutorial/MoveComponent.h" 8 | 9 | /** 10 | * 11 | */ 12 | class NEWCPPTUTORIALEDITOR_API FMoveComponentVisualizer : public FComponentVisualizer 13 | { 14 | 15 | public: 16 | void DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI) override; 17 | 18 | }; 19 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/NewCppTutorialGameModeBase.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | #include "GameFramework/GameModeBase.h" 8 | #include "GameFramework/DefaultPawn.h" 9 | 10 | #include "XPCharacter.h" 11 | 12 | #include "NewCppTutorialGameModeBase.generated.h" 13 | 14 | /** 15 | * 16 | */ 17 | UCLASS() 18 | class NEWCPPTUTORIAL_API ANewCppTutorialGameModeBase : public AGameModeBase 19 | { 20 | GENERATED_BODY() 21 | 22 | public: 23 | void InitGameState() override; 24 | 25 | private: 26 | UPROPERTY(EditAnywhere, NoClear) 27 | TSubclassOf CustomXPCharacterClass = AXPCharacter::StaticClass(); 28 | }; 29 | -------------------------------------------------------------------------------- /Source/NewCppTutorialEditor/MoveComponentVisualizer.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "MoveComponentVisualizer.h" 5 | 6 | void FMoveComponentVisualizer::DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI) 7 | { 8 | // Get our move component 9 | const UMoveComponent* MoveComponent = Cast(Component); 10 | if (MoveComponent) 11 | { 12 | PDI->DrawLine( 13 | MoveComponent->GetComponentLocation(), 14 | MoveComponent->GetComponentLocation() + MoveComponent->MoveOffset, 15 | FLinearColor::Red, 16 | SDPG_Foreground 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /NewCppTutorial.uproject: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "EngineAssociation": "5.0", 4 | "Category": "", 5 | "Description": "", 6 | "Modules": [ 7 | { 8 | "Name": "NewCppTutorial", 9 | "Type": "Runtime", 10 | "LoadingPhase": "Default", 11 | "AdditionalDependencies": [ 12 | "Engine" 13 | ] 14 | }, 15 | { 16 | "Name": "NewCppTutorialEditor", 17 | "Type": "Editor", 18 | "LoadingPhase": "PostEngineInit" 19 | } 20 | ], 21 | "Plugins": [ 22 | { 23 | "Name": "ModelingToolsEditorMode", 24 | "Enabled": true, 25 | "TargetAllowList": [ 26 | "Editor" 27 | ] 28 | }, 29 | { 30 | "Name": "Bridge", 31 | "Enabled": true, 32 | "SupportedTargetPlatforms": [ 33 | "Win64", 34 | "Mac", 35 | "Linux" 36 | ] 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /Source/NewCppTutorial/MyCollectAcceptable.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UObject/Interface.h" 7 | #include "MyCollectAcceptable.generated.h" 8 | 9 | // This class does not need to be modified. 10 | UINTERFACE(MinimalAPI, Blueprintable) 11 | class UMyCollectAcceptable : public UInterface 12 | { 13 | GENERATED_BODY() 14 | }; 15 | 16 | /** 17 | * 18 | */ 19 | class NEWCPPTUTORIAL_API IMyCollectAcceptable 20 | { 21 | GENERATED_BODY() 22 | 23 | // Add interface functions to this class. This is the class that will be inherited to implement this interface. 24 | public: 25 | 26 | UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) 27 | void Collect(UObject* SourceObj, float Count); 28 | }; 29 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/NewCppTutorial.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class NewCppTutorial : ModuleRules 6 | { 7 | public NewCppTutorial(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" }); 12 | 13 | PrivateDependencyModuleNames.AddRange(new string[] { }); 14 | 15 | // Uncomment if you are using Slate UI 16 | // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" }); 17 | 18 | // Uncomment if you are using online features 19 | // PrivateDependencyModuleNames.Add("OnlineSubsystem"); 20 | 21 | // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Source/NewCppTutorialEditor/NewCppTutorialEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class NewCppTutorialEditor : ModuleRules 6 | { 7 | public NewCppTutorialEditor(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UnrealEd", "NewCppTutorial" }); 12 | 13 | PrivateDependencyModuleNames.AddRange(new string[] { }); 14 | 15 | // Uncomment if you are using Slate UI 16 | // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" }); 17 | 18 | // Uncomment if you are using online features 19 | // PrivateDependencyModuleNames.Add("OnlineSubsystem"); 20 | 21 | // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Source/NewCppTutorialEditor/NewCppTutorialEditor.cpp: -------------------------------------------------------------------------------- 1 | #include "NewCppTutorialEditor.h" 2 | #include "Modules/ModuleManager.h" 3 | #include "Modules/ModuleInterface.h" 4 | 5 | IMPLEMENT_GAME_MODULE(FNewCppTutorialEditorModule, NewCppTutorialEditor); 6 | 7 | void FNewCppTutorialEditorModule::StartupModule() 8 | { 9 | // Check if editor is valid 10 | if (GUnrealEd) 11 | { 12 | // Registerin the move visualizer 13 | TSharedPtr MoveVisualizer = MakeShareable(new FMoveComponentVisualizer); 14 | if (MoveVisualizer.IsValid()) 15 | { 16 | GUnrealEd->RegisterComponentVisualizer(UMoveComponent::StaticClass()->GetFName(), MoveVisualizer); 17 | MoveVisualizer->OnRegister(); 18 | } 19 | } 20 | } 21 | 22 | void FNewCppTutorialEditorModule::ShutdownModule() 23 | { 24 | // Check if editor is valid 25 | if (GUnrealEd) 26 | { 27 | GUnrealEd->UnregisterComponentVisualizer(UMoveComponent::StaticClass()->GetFName()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Config/HoloLens/HoloLensEngine.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | [/Script/HoloLensPlatformEditor.HoloLensTargetSettings] 4 | bBuildForEmulation=False 5 | bBuildForDevice=True 6 | bUseNameForLogo=True 7 | bBuildForRetailWindowsStore=False 8 | bAutoIncrementVersion=False 9 | bShouldCreateAppInstaller=False 10 | AppInstallerInstallationURL= 11 | HoursBetweenUpdateChecks=0 12 | bEnablePIXProfiling=False 13 | TileBackgroundColor=(B=64,G=0,R=0,A=255) 14 | SplashScreenBackgroundColor=(B=64,G=0,R=0,A=255) 15 | +PerCultureResources=(CultureId="",Strings=(PackageDisplayName="",PublisherDisplayName="",PackageDescription="",ApplicationDisplayName="",ApplicationDescription=""),Images=()) 16 | TargetDeviceFamily=Windows.Holographic 17 | MinimumPlatformVersion= 18 | MaximumPlatformVersionTested=10.0.18362.0 19 | MaxTrianglesPerCubicMeter=500.000000 20 | SpatialMeshingVolumeSize=20.000000 21 | CompilerVersion=Default 22 | Windows10SDKVersion=10.0.18362.0 23 | +CapabilityList=internetClientServer 24 | +CapabilityList=privateNetworkClientServer 25 | +Uap2CapabilityList=spatialPerception 26 | bSetDefaultCapabilities=False 27 | SpatializationPlugin= 28 | ReverbPlugin= 29 | OcclusionPlugin= 30 | SoundCueCookQualityIndex=-1 31 | 32 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/XPCharacter.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameFramework/Character.h" 7 | 8 | #include "Engine/StaticMesh.h" 9 | #include "Camera/CameraComponent.h" 10 | #include "Components/CapsuleComponent.h" 11 | 12 | #include "XPCharacter.generated.h" 13 | 14 | UCLASS() 15 | class NEWCPPTUTORIAL_API AXPCharacter : public ACharacter 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | // Sets default values for this character's properties 21 | AXPCharacter(); 22 | 23 | protected: 24 | // Called when the game starts or when spawned 25 | virtual void BeginPlay() override; 26 | 27 | public: 28 | // Called every frame 29 | virtual void Tick(float DeltaTime) override; 30 | 31 | // Called to bind functionality to input 32 | virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; 33 | private: 34 | void MoveFB(float Value); 35 | void MoveLR(float Value); 36 | void Rotate(float Value); 37 | 38 | private: 39 | UPROPERTY(EditAnywhere) 40 | float MoveSpeed = 1.0f; 41 | 42 | UPROPERTY(EditAnywhere) 43 | float RotationSpeed = 1.0f; 44 | 45 | // Mesh being displayed 46 | UPROPERTY(EditDefaultsOnly) 47 | UStaticMeshComponent* PlayerMesh; 48 | 49 | // Camera to view the scene 50 | UPROPERTY(EditDefaultsOnly) 51 | UCameraComponent* PlayerCamera; 52 | }; 53 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/MoveComponent.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Components/SceneComponent.h" 7 | #include "MoveComponent.generated.h" 8 | 9 | UDELEGATE(BlueprintAuthorityOnly) 10 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnMoveComponentReachEndPointSignature, bool, IsTopEndpoint); 11 | 12 | UCLASS(ClassGroup=(NewCppTutorial), meta=(BlueprintSpawnableComponent) ) 13 | class NEWCPPTUTORIAL_API UMoveComponent : public USceneComponent 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | // Sets default values for this component's properties 19 | UMoveComponent(); 20 | 21 | UFUNCTION(BlueprintCallable) 22 | void EnableMovement(bool ShouldMove); 23 | 24 | UFUNCTION(BlueprintCallable) 25 | void ResetMovement(); 26 | 27 | UFUNCTION(BlueprintCallable) 28 | void SetMoveDirection(int Direction); 29 | 30 | protected: 31 | // Called when the game starts 32 | virtual void BeginPlay() override; 33 | 34 | public: 35 | // Called every frame 36 | virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; 37 | 38 | private: 39 | friend class FMoveComponentVisualizer; 40 | 41 | // Offset to move 42 | UPROPERTY(EditAnywhere) 43 | FVector MoveOffset; 44 | 45 | // Speed 46 | UPROPERTY(EditAnywhere) 47 | float Speed = 1.0f; 48 | 49 | // Enable the movement of the component 50 | UPROPERTY(EditAnywhere) 51 | bool MoveEnable = true; 52 | 53 | // On Extream reached event 54 | UPROPERTY(BlueprintAssignable) 55 | FOnMoveComponentReachEndPointSignature OnEndpointReached; 56 | 57 | // Computed locations 58 | FVector StartRelativeLocation; 59 | FVector MoveOffsetNorm; 60 | float MaxDistance = 0.0f; 61 | float CurDistance = 0.0f; 62 | int MoveDirection = 1; 63 | 64 | }; 65 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/SpawnBox.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameFramework/Actor.h" 7 | 8 | #include "Components/BoxComponent.h" 9 | 10 | #include "SpawnBox.generated.h" 11 | 12 | UCLASS() 13 | class NEWCPPTUTORIAL_API ASpawnBox : public AActor 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | // Sets default values for this actor's properties 19 | ASpawnBox(); 20 | 21 | protected: 22 | // Called when the game starts or when spawned 23 | virtual void BeginPlay() override; 24 | 25 | // Called when the actor stops playing 26 | void EndPlay(const EEndPlayReason::Type EndPlayReason) override; 27 | 28 | public: 29 | // Will spawn an actor of the specified class now 30 | UFUNCTION(BlueprintCallable) 31 | bool SpawnActor(); 32 | 33 | // Change if actors are spawned 34 | UFUNCTION(BlueprintCallable) 35 | void EnableActorSpawning(bool Enable); 36 | 37 | private: 38 | UFUNCTION() 39 | void SpawnActorScheduled(); 40 | 41 | // Will schedule an actor spawn 42 | void ScheduleActorSpawn(); 43 | 44 | public: 45 | // Actor class to spawn 46 | UPROPERTY(EditAnywhere, BlueprintReadWrite) 47 | TSubclassOf ActorClassToBeSpawned; 48 | 49 | // Average time between spawns (without random) 50 | UPROPERTY(EditAnywhere, BlueprintReadWrite) 51 | float AvgSpawnTime = 5.f; 52 | // Random +/- offset of the spawn time 53 | UPROPERTY(EditAnywhere, BlueprintReadWrite) 54 | float RandomSpawnTimeOffset = 1.f; 55 | 56 | private: 57 | // Box in which we will spawn the actors 58 | UPROPERTY(EditDefaultsOnly) 59 | UBoxComponent* SpawnBox; 60 | 61 | // Indicates that the actor should spawn actors 62 | UPROPERTY(EditAnywhere) 63 | bool ShouldSpawn = true; 64 | 65 | // Helper for timing 66 | FTimerHandle SpawnTimerHandle; 67 | }; 68 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/XPCharacter.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "XPCharacter.h" 5 | 6 | // Sets default values 7 | AXPCharacter::AXPCharacter() 8 | { 9 | // Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it. 10 | PrimaryActorTick.bCanEverTick = true; 11 | 12 | // Setup component hierarchy 13 | PlayerMesh = CreateDefaultSubobject(TEXT("PlayerMesh")); 14 | PlayerMesh->SetupAttachment(GetCapsuleComponent()); 15 | PlayerCamera = CreateDefaultSubobject(TEXT("PlayerCamera")); 16 | PlayerCamera->SetupAttachment(GetCapsuleComponent()); 17 | } 18 | 19 | // Called when the game starts or when spawned 20 | void AXPCharacter::BeginPlay() 21 | { 22 | Super::BeginPlay(); 23 | 24 | 25 | } 26 | 27 | // Called every frame 28 | void AXPCharacter::Tick(float DeltaTime) 29 | { 30 | Super::Tick(DeltaTime); 31 | 32 | } 33 | 34 | // Called to bind functionality to input 35 | void AXPCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) 36 | { 37 | Super::SetupPlayerInputComponent(PlayerInputComponent); 38 | 39 | // Register axis 40 | PlayerInputComponent->BindAxis(TEXT("MoveFB"), this, &AXPCharacter::MoveFB); 41 | PlayerInputComponent->BindAxis(TEXT("MoveLR"), this, &AXPCharacter::MoveLR); 42 | PlayerInputComponent->BindAxis(TEXT("Rotate"), this, &AXPCharacter::Rotate); 43 | } 44 | 45 | void AXPCharacter::MoveFB(float Value) 46 | { 47 | AddMovementInput(GetActorForwardVector(), Value * MoveSpeed); 48 | } 49 | 50 | void AXPCharacter::MoveLR(float Value) 51 | { 52 | AddMovementInput(-GetActorRightVector(), Value * MoveSpeed); 53 | } 54 | 55 | void AXPCharacter::Rotate(float Value) 56 | { 57 | AddControllerYawInput(Value * RotationSpeed); 58 | } 59 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/MyCollectableActor.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameFramework/Actor.h" 7 | 8 | #include "Components/StaticMeshComponent.h" 9 | #include "Components/BoxComponent.h" 10 | #include "GameFramework/DefaultPawn.h" 11 | 12 | #include "MyCollectableActor.generated.h" 13 | 14 | UDELEGATE() 15 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnJumpTriggerSignature, AActor*, OtherActor, UPrimitiveComponent*, OtherComp); 16 | 17 | UCLASS() 18 | class NEWCPPTUTORIAL_API AMyCollectableActor : public AActor 19 | { 20 | GENERATED_BODY() 21 | 22 | public: 23 | // Sets default values for this actor's properties 24 | AMyCollectableActor(); 25 | 26 | UFUNCTION(BlueprintCallable) 27 | void Jump(float velocity); 28 | 29 | protected: 30 | // Called when the game starts or when spawned 31 | virtual void BeginPlay() override; 32 | 33 | // Called when a other actor's component hits the collider 34 | UFUNCTION() 35 | void OnComponentBeginOverlap(class UBoxComponent* Component, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult); 36 | 37 | UPROPERTY(EditAnywhere, BlueprintReadWrite) 38 | float Livetime = 2.f; 39 | 40 | UPROPERTY(EditAnywhere, BlueprintReadWrite) 41 | float Velocity = 3.f; 42 | 43 | UPROPERTY(EditAnywhere, BlueprintReadWrite) 44 | UClass* TriggerClass = ADefaultPawn::StaticClass(); 45 | 46 | public: 47 | // Called every frame 48 | virtual void Tick(float DeltaTime) override; 49 | 50 | private: 51 | // Static mesh for rendering 52 | UPROPERTY(EditDefaultsOnly) 53 | UStaticMeshComponent* StaticMesh; 54 | 55 | UPROPERTY(EditDefaultsOnly) 56 | UBoxComponent* BoxCollision; 57 | 58 | UPROPERTY(BlueprintAssignable) 59 | FOnJumpTriggerSignature OnJumpTrigger; 60 | 61 | bool IsLaunched = false; 62 | }; 63 | -------------------------------------------------------------------------------- /Config/DefaultEngine.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | [/Script/EngineSettings.GameMapsSettings] 4 | EditorStartupMap=/Game/StarterContent/Maps/Minimal_Default.Minimal_Default 5 | LocalMapOptions= 6 | TransitionMap=None 7 | bUseSplitscreen=True 8 | TwoPlayerSplitscreenLayout=Horizontal 9 | ThreePlayerSplitscreenLayout=FavorTop 10 | FourPlayerSplitscreenLayout=Grid 11 | bOffsetPlayerGamepadIds=False 12 | GameInstanceClass=/Script/Engine.GameInstance 13 | GameDefaultMap=/Game/StarterContent/Maps/Minimal_Default.Minimal_Default 14 | ServerDefaultMap=/Engine/Maps/Entry.Entry 15 | GlobalDefaultGameMode=/Game/MyGameMode.MyGameMode_C 16 | GlobalDefaultServerGameMode=None 17 | 18 | [/Script/HardwareTargeting.HardwareTargetingSettings] 19 | TargetedHardwareClass=Desktop 20 | AppliedTargetedHardwareClass=Desktop 21 | DefaultGraphicsPerformance=Maximum 22 | AppliedDefaultGraphicsPerformance=Maximum 23 | 24 | [/Script/WindowsTargetPlatform.WindowsTargetSettings] 25 | DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 26 | 27 | [/Script/Engine.RendererSettings] 28 | r.GenerateMeshDistanceFields=True 29 | r.DynamicGlobalIlluminationMethod=1 30 | r.ReflectionMethod=1 31 | r.Shadow.Virtual.Enable=1 32 | 33 | [/Script/WorldPartitionEditor.WorldPartitionEditorSettings] 34 | CommandletClass=Class'/Script/UnrealEd.WorldPartitionConvertCommandlet' 35 | 36 | [/Script/Engine.Engine] 37 | +ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/NewCppTutorial") 38 | +ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/NewCppTutorial") 39 | +ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="NewCppTutorialGameModeBase") 40 | 41 | [/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] 42 | bEnablePlugin=True 43 | bAllowNetworkConnection=True 44 | SecurityToken=53D883A847475FDCBD5995B72C5D61C0 45 | bIncludeInShipping=False 46 | bAllowExternalStartInShipping=False 47 | bCompileAFSProject=False 48 | bUseCompression=False 49 | bLogFiles=False 50 | bReportStats=False 51 | ConnectionType=USBOnly 52 | bUseManualIPAddress=False 53 | ManualIPAddress= 54 | 55 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/MoveComponent.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "MoveComponent.h" 5 | 6 | // Sets default values for this component's properties 7 | UMoveComponent::UMoveComponent() 8 | { 9 | // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features 10 | // off to improve performance if you don't need them. 11 | PrimaryComponentTick.bCanEverTick = true; 12 | 13 | // ... 14 | } 15 | 16 | void UMoveComponent::EnableMovement(bool ShouldMove) 17 | { 18 | // Assign value and set correct tick enable state 19 | MoveEnable = ShouldMove; 20 | SetComponentTickEnabled(MoveEnable); 21 | } 22 | 23 | void UMoveComponent::ResetMovement() 24 | { 25 | // Clear distance and set to origine 26 | CurDistance = 0.0f; 27 | SetRelativeLocation(StartRelativeLocation); 28 | } 29 | 30 | void UMoveComponent::SetMoveDirection(int Direction) 31 | { 32 | MoveDirection = Direction >= 1 ? 1 : -1; 33 | } 34 | 35 | // Called when the game starts 36 | void UMoveComponent::BeginPlay() 37 | { 38 | Super::BeginPlay(); 39 | 40 | // Set start location 41 | StartRelativeLocation = GetRelativeLocation(); 42 | 43 | // Compute normalized movement 44 | MoveOffsetNorm = MoveOffset; 45 | MoveOffsetNorm.Normalize(); 46 | MaxDistance = MoveOffset.Length(); 47 | 48 | // Check if ticking is required 49 | SetComponentTickEnabled(MoveEnable); 50 | } 51 | 52 | 53 | // Called every frame 54 | void UMoveComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) 55 | { 56 | Super::TickComponent(DeltaTime, TickType, ThisTickFunction); 57 | 58 | // Set the current distance 59 | if (MoveEnable) 60 | { 61 | CurDistance += DeltaTime * Speed * MoveDirection; 62 | if (CurDistance >= MaxDistance || CurDistance <= 0.0f) 63 | { 64 | // Invert direction 65 | MoveDirection *= -1; 66 | 67 | // Fire event 68 | OnEndpointReached.Broadcast(CurDistance >= MaxDistance); 69 | 70 | // Clamp distance 71 | CurDistance = FMath::Clamp(CurDistance, 0.0f, MaxDistance); 72 | } 73 | } 74 | 75 | // Compute and set current location 76 | SetRelativeLocation(StartRelativeLocation + MoveOffsetNorm * CurDistance); 77 | } 78 | 79 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/MyCollectableActor.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "MyCollectableActor.h" 5 | 6 | // Sets default values 7 | AMyCollectableActor::AMyCollectableActor() 8 | { 9 | // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. 10 | PrimaryActorTick.bCanEverTick = true; 11 | 12 | // Create the (root) component for rendering 13 | StaticMesh = CreateDefaultSubobject(TEXT("StaticMesh")); 14 | RootComponent = StaticMesh; 15 | 16 | // Create collision box 17 | BoxCollision = CreateDefaultSubobject(TEXT("BoxCollision")); 18 | BoxCollision->SetupAttachment(StaticMesh); 19 | } 20 | 21 | void AMyCollectableActor::Jump(float velocity) 22 | { 23 | // make shure jump is only executed once 24 | if (!IsLaunched) 25 | { 26 | // Excute jump using the physics system 27 | StaticMesh->AddImpulse({ .0f, .0f, velocity * 500.f }); 28 | 29 | // Initiate object destruction 30 | SetActorTickEnabled(true); 31 | IsLaunched = true; 32 | } 33 | } 34 | 35 | // Called when the game starts or when spawned 36 | void AMyCollectableActor::BeginPlay() 37 | { 38 | Super::BeginPlay(); 39 | 40 | // Setup per instance OnComponentOverlap event 41 | FScriptDelegate DelegateSubscriber; 42 | DelegateSubscriber.BindUFunction(this, "OnComponentBeginOverlap"); 43 | BoxCollision->OnComponentBeginOverlap.Add(DelegateSubscriber); 44 | 45 | // Ticking is only required after launching 46 | SetActorTickEnabled(false); 47 | } 48 | 49 | void AMyCollectableActor::OnComponentBeginOverlap(class UBoxComponent* Component, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) 50 | { 51 | if (!IsLaunched && OtherActor->IsA(TriggerClass)) 52 | { 53 | OnJumpTrigger.Broadcast(OtherActor, Component); 54 | } 55 | } 56 | 57 | // Called every frame 58 | void AMyCollectableActor::Tick(float DeltaTime) 59 | { 60 | Super::Tick(DeltaTime); 61 | 62 | if (IsLaunched) 63 | { 64 | // Decrement lifetime 65 | Livetime -= DeltaTime; 66 | 67 | // Check actor destruction 68 | if (Livetime <= 0.f) 69 | { 70 | Destroy(); 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /Source/NewCppTutorial/SpawnBox.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "SpawnBox.h" 5 | 6 | // Sets default values 7 | ASpawnBox::ASpawnBox() 8 | { 9 | // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. 10 | PrimaryActorTick.bCanEverTick = false; 11 | 12 | // Setup members 13 | SpawnBox = CreateDefaultSubobject(TEXT("SpawnBox")); 14 | RootComponent = SpawnBox; 15 | } 16 | 17 | // Called when the game starts or when spawned 18 | void ASpawnBox::BeginPlay() 19 | { 20 | Super::BeginPlay(); 21 | 22 | // Schedule first spawn 23 | if (ShouldSpawn) 24 | { 25 | ScheduleActorSpawn(); 26 | } 27 | } 28 | 29 | void ASpawnBox::EndPlay(const EEndPlayReason::Type EndPlayReason) 30 | { 31 | Super::EndPlay(EndPlayReason); 32 | 33 | // Remove all timers associated with this objects instance 34 | GetWorld()->GetTimerManager().ClearAllTimersForObject(this); 35 | } 36 | 37 | bool ASpawnBox::SpawnActor() 38 | { 39 | bool SpawnedActor = false; 40 | if (ActorClassToBeSpawned) 41 | { 42 | // Calculate the extends of the box 43 | FBoxSphereBounds BoxBounds = SpawnBox->CalcBounds(GetActorTransform()); 44 | 45 | // Compute a random position within the box bounds 46 | FVector SpawnLocation = BoxBounds.Origin; 47 | SpawnLocation.X += -BoxBounds.BoxExtent.X + 2 * BoxBounds.BoxExtent.X * FMath::FRand(); 48 | SpawnLocation.Y += -BoxBounds.BoxExtent.Y + 2 * BoxBounds.BoxExtent.Y * FMath::FRand(); 49 | SpawnLocation.Z += -BoxBounds.BoxExtent.Z + 2 * BoxBounds.BoxExtent.Z * FMath::FRand(); 50 | 51 | // Spawn the actor 52 | SpawnedActor = GetWorld()->SpawnActor(ActorClassToBeSpawned, &SpawnLocation) != nullptr; 53 | } 54 | 55 | return SpawnedActor; 56 | } 57 | 58 | void ASpawnBox::EnableActorSpawning(bool Enable) 59 | { 60 | // Update internal state 61 | ShouldSpawn = Enable; 62 | 63 | // Check witch timer action should be done 64 | if (Enable) 65 | { 66 | ScheduleActorSpawn(); 67 | } 68 | else 69 | { 70 | GetWorld()->GetTimerManager().ClearTimer(SpawnTimerHandle); 71 | } 72 | } 73 | 74 | void ASpawnBox::ScheduleActorSpawn() 75 | { 76 | // 1. Compute time offset to spawn 77 | float DeltaToNextSpawn = AvgSpawnTime + (-RandomSpawnTimeOffset + 2 * RandomSpawnTimeOffset * FMath::FRand()); 78 | 79 | // 2. Schedule spawning 80 | GetWorld()->GetTimerManager().SetTimer(SpawnTimerHandle, this, &ASpawnBox::SpawnActorScheduled, DeltaToNextSpawn, false); 81 | } 82 | 83 | void ASpawnBox::SpawnActorScheduled() 84 | { 85 | // Spawn and Reschedule if required 86 | if (SpawnActor()) 87 | { 88 | if (ShouldSpawn) 89 | { 90 | ScheduleActorSpawn(); 91 | } 92 | } 93 | else 94 | { 95 | // TODO... log error 96 | } 97 | } 98 | 99 | -------------------------------------------------------------------------------- /Config/DefaultInput.ini: -------------------------------------------------------------------------------- 1 | [/Script/Engine.InputSettings] 2 | -AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) 3 | -AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) 4 | -AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) 5 | -AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) 6 | -AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) 7 | -AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) 8 | -AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) 9 | +AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 10 | +AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 11 | +AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 12 | +AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 13 | +AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) 14 | +AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) 15 | +AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) 16 | +AxisConfig=(AxisKeyName="MouseWheelAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 17 | +AxisConfig=(AxisKeyName="Gamepad_LeftTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 18 | +AxisConfig=(AxisKeyName="Gamepad_RightTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 19 | +AxisConfig=(AxisKeyName="Gamepad_Special_Left_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 20 | +AxisConfig=(AxisKeyName="Gamepad_Special_Left_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 21 | +AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 22 | +AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 23 | +AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 24 | +AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 25 | +AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 26 | +AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 27 | +AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 28 | +AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 29 | +AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 30 | +AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 31 | +AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 32 | +AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 33 | +AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 34 | +AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 35 | +AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 36 | +AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 37 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 38 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 39 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 40 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 41 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 42 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 43 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 44 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 45 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 46 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 47 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 48 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 49 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 50 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 51 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 52 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 53 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Touch",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 54 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 55 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 56 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 57 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 58 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 59 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 60 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 61 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 62 | bAltEnterTogglesFullscreen=True 63 | bF11TogglesFullscreen=True 64 | bUseMouseForTouch=False 65 | bEnableMouseSmoothing=True 66 | bEnableFOVScaling=True 67 | bCaptureMouseOnLaunch=True 68 | bEnableLegacyInputScales=True 69 | bAlwaysShowTouchInterface=False 70 | bShowConsoleOnFourFingerTap=True 71 | bEnableGestureRecognizer=False 72 | bUseAutocorrect=False 73 | DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown 74 | DefaultViewportMouseLockMode=LockOnCapture 75 | FOVScale=0.011110 76 | DoubleClickTime=0.200000 77 | +AxisMappings=(AxisName="MoveFB",Scale=1.000000,Key=W) 78 | +AxisMappings=(AxisName="MoveFB",Scale=-1.000000,Key=S) 79 | +AxisMappings=(AxisName="MoveFB",Scale=1.000000,Key=Gamepad_LeftY) 80 | +AxisMappings=(AxisName="MoveLR",Scale=1.000000,Key=A) 81 | +AxisMappings=(AxisName="MoveLR",Scale=-1.000000,Key=D) 82 | +AxisMappings=(AxisName="MoveLR",Scale=1.000000,Key=Gamepad_LeftX) 83 | +AxisMappings=(AxisName="Rotate",Scale=1.000000,Key=MouseX) 84 | +AxisMappings=(AxisName="Rotate",Scale=1.000000,Key=Gamepad_RightX) 85 | DefaultPlayerInputClass=/Script/Engine.PlayerInput 86 | DefaultInputComponentClass=/Script/Engine.InputComponent 87 | DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks 88 | -ConsoleKeys=Tilde 89 | +ConsoleKeys=Tilde 90 | +ConsoleKeys=Caret 91 | 92 | --------------------------------------------------------------------------------