Added mouse sensitivity to C++ class
Added game instance C++ class (unused)
This commit is contained in:
5
Source/OpenConflict/DDIGameInstance.cpp
Normal file
5
Source/OpenConflict/DDIGameInstance.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DDIGameInstance.h"
|
||||
|
||||
17
Source/OpenConflict/DDIGameInstance.h
Normal file
17
Source/OpenConflict/DDIGameInstance.h
Normal 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()
|
||||
|
||||
};
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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*/
|
||||
|
||||
Reference in New Issue
Block a user