game mode

This commit is contained in:
Futaba Soup 2025-08-28 20:31:52 -05:00
parent bcf4af827c
commit fef6bd8e3e
8 changed files with 66 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -3,3 +3,35 @@
#include "Character/AuraCharacter.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "GameFramework/SpringArmComponent.h"
AAuraCharacter::AAuraCharacter()
{
SpringArm = CreateDefaultSubobject<USpringArmComponent>("SpringArm");
SpringArm->TargetArmLength = 700.f;
SpringArm->bEnableCameraLag = true;
SpringArm->CameraLagSpeed = 10;
SpringArm->bUsePawnControlRotation = false;
SpringArm->bInheritPitch = false;
SpringArm->bInheritRoll = false;
SpringArm->bInheritYaw = false;
SpringArm->SetRelativeRotation (FRotator (0.f, -45.f, 0.f));
SpringArm->SetupAttachment(GetRootComponent ());
Camera = CreateDefaultSubobject<UCameraComponent>("Camera");
Camera->bUsePawnControlRotation = false;
Camera->SetupAttachment(SpringArm);
GetCharacterMovement()->bOrientRotationToMovement = true;
GetCharacterMovement()->RotationRate = FRotator (0.f, 400.f, 0.f);
GetCharacterMovement()->bConstrainToPlane = true;
GetCharacterMovement()->bSnapToPlaneAtStart = true;
bUseControllerRotationPitch = false;
bUseControllerRotationYaw = false;
bUseControllerRotationRoll = false;
}

View File

@ -0,0 +1,5 @@
// Copyright; GhostPacket Games
#include "Game/AuraGameModeBase.h"

View File

@ -6,12 +6,21 @@
#include "Character/AuraCharacterBase.h"
#include "AuraCharacter.generated.h"
/**
*
*/
class USpringArmComponent;
class UCameraComponent;
UCLASS()
class AURA_API AAuraCharacter : public AAuraCharacterBase
{
GENERATED_BODY()
public:
AAuraCharacter ();
private:
UPROPERTY (EditAnywhere)
TObjectPtr<USpringArmComponent> SpringArm;
UPROPERTY (EditAnywhere)
TObjectPtr<UCameraComponent> Camera;
};

View File

@ -0,0 +1,17 @@
// Copyright; GhostPacket Games
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "AuraGameModeBase.generated.h"
/**
*
*/
UCLASS()
class AURA_API AAuraGameModeBase : public AGameModeBase
{
GENERATED_BODY()
};