Initializes basic game framework
Configures the default level, game mode, player controller, and player pawn. Sets up basic movement input for the player pawn. This commit lays the groundwork for further game development.
This commit is contained in:
@@ -3,16 +3,33 @@
|
||||
|
||||
#include "M4_PlayerController.h"
|
||||
|
||||
#include "Camera/CameraComponent.h"
|
||||
|
||||
AM4_PlayerController::AM4_PlayerController()
|
||||
{
|
||||
CameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));
|
||||
CameraComponent->ProjectionMode = ECameraProjectionMode::Orthographic;
|
||||
CameraComponent->OrthoWidth = 2048.0f;
|
||||
CameraComponent->SetupAttachment(RootComponent);
|
||||
}
|
||||
|
||||
void AM4_PlayerController::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
if (CameraComponent)
|
||||
{
|
||||
CameraComponent->SetRelativeLocation(FVector(0, 0, 1000));
|
||||
CameraComponent->SetRelativeRotation(FRotator(-90.0f, 0.0f, 0.0f));
|
||||
}
|
||||
}
|
||||
|
||||
void AM4_PlayerController::SetupInputComponent()
|
||||
{
|
||||
Super::SetupInputComponent();
|
||||
}
|
||||
|
||||
void AM4_PlayerController::OnPossess(APawn* InPawn)
|
||||
{
|
||||
Super::OnPossess(InPawn);
|
||||
}
|
||||
Reference in New Issue
Block a user