Game Mode and Movement

This commit is contained in:
2024-11-17 20:39:21 -04:00
parent 43650f25cb
commit 787d39bca8
8 changed files with 69 additions and 7 deletions

Binary file not shown.

Binary file not shown.

BIN
Content/Blueprints/Game/BP_AuraGM.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Maps/StartupMap.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -3,3 +3,28 @@
#include "Character/AuraCharacter.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "GameFramework/SpringArmComponent.h"
AAuraCharacter::AAuraCharacter()
{
GetCharacterMovement()->bOrientRotationToMovement = true;
GetCharacterMovement()->RotationRate = FRotator(0.f, 400.f, 0.f);
GetCharacterMovement()->bConstrainToPlane = true;
GetCharacterMovement()->bSnapToPlaneAtStart = true;
bUseControllerRotationPitch = false;
bUseControllerRotationYaw = false;
bUseControllerRotationRoll = false;
CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));
CameraBoom->SetupAttachment(GetRootComponent());
CameraBoom->bInheritPitch = false;
CameraBoom->bInheritRoll = false;
CameraBoom->bInheritYaw = false;
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
Camera->SetupAttachment(CameraBoom);
}

View File

@ -0,0 +1,5 @@
// Assets provided by DruidMechanics. Copyright Jonathan Rampersad 2024
#include "Game/AuraGameModeBase.h"

View File

@ -6,6 +6,9 @@
#include "AuraCharacterBase.h"
#include "AuraCharacter.generated.h"
class USpringArmComponent;
class UCameraComponent;
/**
*
*/
@ -14,4 +17,13 @@ class AURA_API AAuraCharacter : public AAuraCharacterBase
{
GENERATED_BODY()
private:
UPROPERTY(EditAnywhere, Category=Camera)
TObjectPtr<USpringArmComponent> CameraBoom;
UPROPERTY(EditAnywhere, Category=Camera)
TObjectPtr<UCameraComponent> Camera;
public:
AAuraCharacter();
};

View File

@ -0,0 +1,17 @@
// Assets provided by DruidMechanics. Copyright Jonathan Rampersad 2024
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "AuraGameModeBase.generated.h"
/**
*
*/
UCLASS()
class AURA_API AAuraGameModeBase : public AGameModeBase
{
GENERATED_BODY()
};