Game Mode and Movement
This commit is contained in:
BIN
Content/Blueprints/Character/Aura/Animation/ABP_Aura.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Character/Aura/Animation/ABP_Aura.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Character/Aura/BP_AuraCharacter.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Character/Aura/BP_AuraCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Game/BP_AuraGM.uasset
(Stored with Git LFS)
Normal file
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)
BIN
Content/Maps/StartupMap.umap
(Stored with Git LFS)
Binary file not shown.
@ -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);
|
||||
}
|
||||
|
||||
|
5
Source/Aura/Private/Game/AuraGameModeBase.cpp
Normal file
5
Source/Aura/Private/Game/AuraGameModeBase.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
// Assets provided by DruidMechanics. Copyright Jonathan Rampersad 2024
|
||||
|
||||
|
||||
#include "Game/AuraGameModeBase.h"
|
||||
|
@ -6,6 +6,9 @@
|
||||
#include "AuraCharacterBase.h"
|
||||
#include "AuraCharacter.generated.h"
|
||||
|
||||
class USpringArmComponent;
|
||||
class UCameraComponent;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -13,5 +16,14 @@ UCLASS()
|
||||
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();
|
||||
};
|
||||
|
17
Source/Aura/Public/Game/AuraGameModeBase.h
Normal file
17
Source/Aura/Public/Game/AuraGameModeBase.h
Normal 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()
|
||||
|
||||
};
|
Reference in New Issue
Block a user