Added mouse sensitivity to C++ class

Added game instance C++ class (unused)
This commit is contained in:
Kukukakhew
2025-11-26 21:15:04 -05:00
parent faa7e1e436
commit 59bc1a9b22
6 changed files with 27 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DDIGameInstance.h"

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/GameInstance.h"
#include "DDIGameInstance.generated.h"
/**
*
*/
UCLASS()
class OPENCONFLICT_API UDDIGameInstance : public UGameInstance
{
GENERATED_BODY()
};

View File

@@ -74,7 +74,7 @@ void ADDIPlayerController::Move(const FInputActionValue& Value)
void ADDIPlayerController::Look(const FInputActionValue& Value)
{
const FVector2D LookAxisVector = Value.Get<FVector2D>();
const FVector2D LookAxisVector = Value.Get<FVector2D>()*mouseSensitivity; //Added mouseSensitivity
if (APawn* ControlledPawn = GetPawn())
{

View File

@@ -36,12 +36,15 @@ protected:
UPROPERTY(EditAnywhere, Category="Shooter")
FName PlayerPawnTag = FName("Player");
/**/
/*Functions*/
public:
/*Properties*/
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Game Settings")
float mouseSensitivity;
/*Functions*/
/*C++ only declarations*/