diff --git a/Project/Binaries/Win64/UnrealEditor-Gasa.dll b/Project/Binaries/Win64/UnrealEditor-Gasa.dll index 7de0225..2bc4451 100644 Binary files a/Project/Binaries/Win64/UnrealEditor-Gasa.dll and b/Project/Binaries/Win64/UnrealEditor-Gasa.dll differ diff --git a/Project/Binaries/Win64/UnrealEditor-Gasa.pdb b/Project/Binaries/Win64/UnrealEditor-Gasa.pdb index 35ddc73..89e1af9 100644 Binary files a/Project/Binaries/Win64/UnrealEditor-Gasa.pdb and b/Project/Binaries/Win64/UnrealEditor-Gasa.pdb differ diff --git a/Project/Gasa.sln.DotSettings.user b/Project/Gasa.sln.DotSettings.user new file mode 100644 index 0000000..937060c --- /dev/null +++ b/Project/Gasa.sln.DotSettings.user @@ -0,0 +1,2 @@ + + Override \ No newline at end of file diff --git a/Project/Source/Gasa/Character/GasaCharacter.h b/Project/Source/Gasa/Character/GasaCharacter.h index 8b1e5d4..a310dd9 100644 --- a/Project/Source/Gasa/Character/GasaCharacter.h +++ b/Project/Source/Gasa/Character/GasaCharacter.h @@ -9,13 +9,13 @@ class GASA_API AGasaCharacter : public ACharacter { GENERATED_BODY() public: - AGasaCharacter(); - #pragma region Combat UPROPERTY(EditAnywhere, Category="Combat") TObjectPtr Weapon; #pragma endregion Combat + AGasaCharacter(); + #pragma region Actor void BeginPlay() override; #pragma endregion Actor diff --git a/Project/Source/Gasa/Gasa.Build.cs b/Project/Source/Gasa/Gasa.Build.cs index 2783e9f..c277120 100644 --- a/Project/Source/Gasa/Gasa.Build.cs +++ b/Project/Source/Gasa/Gasa.Build.cs @@ -13,6 +13,8 @@ public class Gasa : ModuleRules #region Engine PrivateIncludePathModuleNames.AddRange(new string[] { "Core", + "Engine", + "EnhancedInput", }); PrivateDependencyModuleNames.AddRange(new string[] { "Core", diff --git a/Project/Source/Gasa/GasaCommon.h b/Project/Source/Gasa/GasaCommon.h new file mode 100644 index 0000000..083591c --- /dev/null +++ b/Project/Source/Gasa/GasaCommon.h @@ -0,0 +1,5 @@ +// #define private protected + +#include "CoreMinimal.h" + +class UInputMappingContext; \ No newline at end of file diff --git a/Project/Source/Gasa/GasaPlayerController.cpp b/Project/Source/Gasa/GasaPlayerController.cpp index 436288c..7a78874 100644 --- a/Project/Source/Gasa/GasaPlayerController.cpp +++ b/Project/Source/Gasa/GasaPlayerController.cpp @@ -1 +1,28 @@ -#include "GasaPlayerController.h" \ No newline at end of file +#include "GasaPlayerController.h" + +#include "Engine/LocalPlayer.h" +#include "EnhancedInputSubsystems.h" + +AGasaPlayerController::AGasaPlayerController() +{ + bReplicates = true; +} + +void AGasaPlayerController::BeginPlay() +{ + Super::BeginPlay(); + + check(IMC); + UEnhancedInputLocalPlayerSubsystem* + EILP_Subsystem = ULocalPlayer::GetSubsystem(GetLocalPlayer()); + check(EILP_Subsystem); + EILP_Subsystem->AddMappingContext(IMC, 0); + { + bShowMouseCursor = true; + DefaultMouseCursor = EMouseCursor::Default; + FInputModeGameAndUI MouseMode; + MouseMode.SetLockMouseToViewportBehavior(EMouseLockMode::DoNotLock); + MouseMode.SetHideCursorDuringCapture(false); + SetInputMode(MouseMode); + } +} diff --git a/Project/Source/Gasa/GasaPlayerController.h b/Project/Source/Gasa/GasaPlayerController.h index 9055838..2135a7d 100644 --- a/Project/Source/Gasa/GasaPlayerController.h +++ b/Project/Source/Gasa/GasaPlayerController.h @@ -1,12 +1,18 @@ #pragma once +#include "GasaCommon.h" + #include "GasaPlayerController.generated.h" UCLASS(Blueprintable) class GASA_API AGasaPlayerController : public APlayerController { GENERATED_BODY() - public: + + TObjectPtr IMC; + AGasaPlayerController(); + + void BeginPlay() override; };