구현 방법 선택
블루프린트
C++
이 튜토리얼에서는 캐릭터를 만들어 입력을 수신하도록 구성한 다음 해당 캐릭터를 게임 모드에 할당합니다. 캐릭터를 만들고 플레이어 입력에 반응하는 방법을 정의합니다.
언리얼 엔진은 다양한 프로젝트 유형을 위해 좀 더 복잡한 입력을 제공합니다. 자세한 내용은 향상된 입력을 참고하세요.
프로젝트 구성
게임(Games) > 기본(Blank) > 블루프린트(Blueprint) 프로젝트를 새로 생성하고, 이름은 'SettingUpInput '으로 짓습니다.
에디터에서 편집(Edit) > 프로젝트 세팅(Project Settings) > 입력(Input) > 바인딩(Bindings) 으로 이동합니다.
게임(Games) > 기본(Blank) > C++ 프로젝트를 새로 생성하고, 이름은 'SettingUpInput '으로 짓습니다.
에디터**에서 편집(Edit) > 프로젝트 세팅(Project Settings) > 입력(Input) > 바인딩(Bindings)** 으로 이동합니다.
액션 및 축 매핑 구성
입력 정의는 액션 및 축 매핑 에 대한 사용자 정의 바인딩 을 통해 이뤄집니다. 두 매핑을 통해 입력 동작와 이를 호출하는 키 사이에 인디렉션 레이어를 삽입하여 키와 축을 입력 행동에 편리하게 매핑하는 매커니즘을 제공합니다.
액션 매핑은 키를 누르고 떼는 것, 축 매핑은 연속된 범위 입력에 대해 매핑이 가능합니다. 매핑을 정의하고 나면 블루프린트 또는 C++에서의 행동에 바인딩할 수 있습니다.
입력 매핑 옆에 있는 추가(+) 아이콘을 클릭하여 Jump 라는 새로운 액션을 만듭니다.
드롭다운 화살표(1) 또는 Select Key Value (키 값 선택) 버튼(2)에서 Space Bar 키 값을 검색하여 선택합니다.
축 매핑 으로 이동하여 추가(+) 아이콘을 클릭한 다음 축 매핑 이름, 키 값, 스케일 값을 설정합니다.
축 매핑 이름
키 값
스케일 값
MoveForward
W
1.0
S
-1.0
MoveRight
A
-1.0
D
1.0
Turn
Mouse X
1.0
LookUp
Mouse Y
-1.0
샘플 캐릭터 생성
샘플 캐릭터 생성
캐릭터는 걸어 다닐 수 있는 특수한 타입의 폰(Pawn) 입니다. 캐릭터는 폰 클래스에서 확장되며 월드 내 플레이어 또는 AI 엔티티의 물리적 표현 등 유사한 프로퍼티를 상속합니다.
콘텐츠 드로어(Content Drawer) 에서 추가 (+)를 클릭하고 부모 클래스 선택(Pick Parent Class) 메뉴에서 캐릭터(Character) 를 부모 클래스로 선택합니다.
블루프린트 이름을 BP_ExampleCharacter 로 변경하고 더블클릭하여 클래스 디폴트를 엽니다.
캐릭터는 걸어 다닐 수 있는 특수한 타입의 폰(Pawn) 입니다. 캐릭터는 폰 클래스에서 확장되며 월드 내 플레이어 또는 AI 엔티티의 물리적 표현 등 유사한 프로퍼티를 상속합니다.
콘텐츠 드로어(Content Drawer) 의 C++ 클래스(C++ Classes) 폴더에서 우클릭하여 새 C++ 클래스(New C++ Class) 를 선택한 다음 캐릭터(Character) 를 부모 클래스로 선택합니다.
캐릭터 클래스의 이름을 'ExampleCharacter '로 지정한 다음 클래스 생성(Create Class) 을 클릭합니다.
(w:600)
스프링 암 및 카메라 컴포넌트 생성
스프링 암 및 카메라 컴포넌트 생성
카메라(Camera) 와 스프링 암(SpringArm) 컴포넌트를 함께 사용하면 삼인칭 시점에서 게임 월드를 동적으로 조정할 수 있습니다. 카메라 컴포넌트에는 플레이어의 시점이나 플레이어가 월드를 보는 방식을 나타내는 카메라가 포함됩니다. 스프링 암 컴포넌트는 '카메라 붐'으로 사용되어 플레이어의 카메라가 월드와 충돌하지 않게 합니다.
컴포넌트(Components) 탭에서 추가(+) 를 클릭한 다음 드롭다운에서 스프링 암(Spring Arm) 을 검색하여 선택합니다. 스프링 암 컴포넌트의 이름을 CameraBoom 으로 변경합니다.
1단계를 반복하되 카메라(Camera) 를 검색하고 선택합니다. 카메라 컴포넌트의 이름을 FollowCamera 로 변경합니다.
컴포넌트(Components) 탭에서 FollowCamera 를 CameraBoom 위로 드래그하여 어태치합니다.
컴포넌트 탭에서 CameraBoom을 선택한 다음 디테일(Details) > 카메라 세팅(Camera Settings) 에서 폰 제어 회전 사용(Use Pawn Control Rotation) 변수의 체크박스를 클릭하여 활성화합니다. 활성화되면 카메라 부모가 폰 ExampleCharacter 의 뷰 및 컨트롤 회전을 사용합니다.
캐릭터 시점을 위해 추가 스프링 암 및 카메라 세팅을 사용할 수도 있습니다. 카메라 사용하기 문서를 참고하세요.
컴파일(Compile) 하고 저장(Save) 합니다.
카메라(Camera) 와 스프링 암(SpringArm) 컴포넌트를 함께 사용하면 삼인칭 시점에서 게임 월드를 동적으로 조정할 수 있습니다. 카메라 컴포넌트에는 플레이어의 시점이나 플레이어가 월드를 보는 방식을 나타내는 카메라가 포함됩니다. 스프링 암 컴포넌트는 '카메라 붐'으로 사용되어 플레이어의 카메라가 월드와 충돌하지 않게 합니다.
코드 에디터에서 ExampleCharacter.h 로 이동합니다. 클래스 디폴트(Class defaults) 에서 아래 클래스를 선언합니다.
protected: UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Components") class USpringArmComponent* CameraBoom; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Components") class UCameraComponent* FollowCamera; |
UProperty Specifiers는 블루프린트 에디터에서 컴포넌트의 가시성을 제공하는 데 사용됩니다.
ExampleCharacter.cpp
파일로 이동합니다. include 행에 다음 라이브러리를 추가합니다.#include "GameFramework/SpringArmComponent.h" #include "Camera/CameraComponent.h"
그런 다음 아래의
AExampleCharacter
생성자를 구현합니다.AExampleCharacter::AExampleCharacter() { //카메라 붐 초기화 CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom")); //클래스의 루트 컴포넌트에 카메라 붐 어태치먼트 설정 CameraBoom->SetupAttachment(RootComponent); //PawnControlRotation 사용 부울을 true로 설정 CameraBoom->bUsePawnControlRotation = true; //FollowCamera 초기화 FollowCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera")); //카메라 붐에 FollowCamera 어태치먼트 설정 FollowCamera->SetupAttachment(CameraBoom); }
컴포넌트는 FObjectInitializer::CreateDefaultSubobject 템플릿을 호출한 다음 SetupAttachment 메서드를 사용하여 부모 씬 컴포넌트에 어태치합니다. 카메라 붐이 폰의 제어 회전을 사용하도록 설정하면 자신이 아닌 부모 폰의 회전을 대신 사용합니다.
코드를 컴파일합니다.
캐릭터 메시 세팅
컴포넌트(Components) 패널에서 메시(Mesh) 스켈레탈 메시 컴포넌트를 선택합니다.
디테일(Details) > 메시(Mesh) > 스켈레탈 메시(Skeletal Mesh) 의 드롭다운 메뉴를 펼칩니다. 에셋 옵션 탐색(Browse Asset Options) > 콘텐츠(Content) > 엔진 콘텐츠 표시(Show Engine Content) 를 선택합니다.
TutorialTPP 스켈레탈 메시를 검색하고 선택합니다.
트랜스폼(Transform) 카테고리에서 위치(Location) 및 회전(Rotation) 벡터 값을 (0.0, 0.0, -90 )으로 설정합니다.
컴파일(Compile) 하고 저장(Save) 합니다.
입력 컴포넌트에 액션/축 함수 생성
ExampleCharacter.h
클래스 디폴트에서 다음 입력 함수를 선언합니다.
protected:
void MoveForward(float AxisValue);
void MoveRight(float AxisValue);
ExampleCharacter.cpp
에서MoveForward
및MoveRight
메서드를 구현합니다.
void AExampleCharacter::MoveForward(float AxisValue)
{
if ((Controller != NULL) && (AxisValue != 0.0f))
{
//앞쪽 찾기
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
//앞쪽 벡터 구하기
const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
AddMovementInput(Direction, AxisValue);
}
}
void AExampleCharacter::MoveRight(float AxisValue)
{
if ((Controller != NULL) && (AxisValue != 0.0f))
{
//오른쪽 방향 찾기
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
//오른쪽 벡터 구하기
const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);
//해당 방향으로 이동 추가
AddMovementInput(Direction, AxisValue);
}
}
SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) 메서드에서 다음 코드를 구현합니다.
void AExampleCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump);
PlayerInputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping);
PlayerInputComponent->BindAxis("MoveForward", this, &AExampleCharacter::MoveForward);
PlayerInputComponent->BindAxis("MoveRight", this, &AExampleCharacter::MoveRight);
PlayerInputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput);
PlayerInputComponent->BindAxis("LookUp", this, &APawn::AddControllerPitchInput);
}
[REGION:note]
[플레이어 입력 컴포넌트](making-interactive-experiences\Input\input-overview)는 프로젝트의 축 매핑과 액션 매핑을 게임 액션에 연결합니다. 폰과 캐릭터 클래스는 상속된 메서드를 포함하며 커스텀 캐릭터로 사용되거나 확장될 수 있습니다.
이 예시에서는 폰의 AddControllerYawInput 및 AddControllerPitchInput 함수, 캐릭터의 Jump 및 StopJumping 함수를 사용했습니다.
[/REGION]
코드를 컴파일합니다.
입력 이벤트에 액션/축 함수 생성
내 블루프린트(My Blueprint) > 함수(Functions) 에서 추가 (+)를 클릭하여 새 함수를 2개 추가합니다. 이름은 MoveForward 와 MoveRight 로 짓습니다.
MoveForward 함수를 선택하고 디테일(Details) > 입력(Inputs) 으로 이동한 다음 추가 (+ )를 클릭하여 AxisValue 라는 이름으로 새 플로트 변수를 추가합니다.
MoveForward 함수에 아래 로직을 복사 또는 구현합니다.
Copy Node GraphBegin Object Class=/Script/BlueprintGraph.K2Node_FunctionEntry Name="K2Node_FunctionEntry_0" ExtraFlags=201457664 FunctionReference=(MemberName="MoveForward") bIsEditable=True NodePosX=-32 NodePosY=16 NodeGuid=A0FF87524A53EDAA6CBEC48FEE0D9464 CustomProperties Pin (PinId=B427E05D444F66A59DA68E9A5D09AB7B,PinName="then",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_7346 B27FCDDF43B9261BD870CE965B82DF38,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=F01767A145595ED17A3E438A7F7BEFA2,PinName="AxisValue",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="double",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_7346 D95413A34BE985375A5C2F905CD8109F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties UserDefinedPin (PinName="AxisValue",PinType=(PinCategory="real",PinSubCategory="double"),DesiredPinDirection=EGPD_Output) End Object Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_7346" FunctionReference=(MemberName="AddMovementInput",bSelfContext=True) NodePosX=384 ErrorType=1 NodeGuid=CE1F697649E08F668E46BFA6FF6FE134 CustomProperties Pin (PinId=B27FC
MoveRight 함수를 선택하고 2단계의 설명대로 새 플로트 변수를 추가합니다.
MoveRight 함수에 아래 로직을 복사 또는 구현합니다.
Copy Node GraphBegin Object Class=/Script/BlueprintGraph.K2Node_FunctionEntry Name="K2Node_FunctionEntry_0" ExtraFlags=201457664 FunctionReference=(MemberName="MoveRight") bIsEditable=True NodePosX=64 NodePosY=-48 NodeGuid=5846746C4FEEF77A895638939B0C845C CustomProperties Pin (PinId=09949021438E59AA6E23A8B112C93B0D,PinName="then",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_7346 B27FCDDF43B9261BD870CE965B82DF38,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=0FE0FC0344DE295574151E8BA52B9628,PinName="AxisValue",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="double",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_7346 D95413A34BE985375A5C2F905CD8109F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties UserDefinedPin (PinName="AxisValue",PinType=(PinCategory="real",PinSubCategory="double"),DesiredPinDirection=EGPD_Output) End Object Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_7346" FunctionReference=(MemberName="AddMovementInput",bSelfContext=True) NodePosX=432 NodePosY=-64 ErrorType=1 NodeGuid=0A9F72574C55739F8ABF479B3DA34A3C CustomProperties Pin (
이벤트 그래프(Event Graph) 탭으로 이동합니다. 축과 액션 입력 이벤트를 설정하고 이벤트에 해당하는 함수를 호출하게 해야 합니다. 아래 로직을 복사 또는 구현합니다.
Copy Node Graph
완성된 코드
ExampleCharacter.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "ExampleCharacter.generated.h"
UCLASS()
class SETTINGUPINPUT_API AExampleCharacter : public ACharacter
{
GENERATED_BODY()
public:
//이 캐릭터의 프로퍼티에 적용되는 디폴트값 설정
AExampleCharacter();
protected:
//게임 시작 또는 스폰 시 호출
virtual void BeginPlay() override;
UPROPERTY(EditDefaultsOnly,BlueprintReadOnly)
class USpringArmComponent* CameraBoom;
UPROPERTY(EditDefaultsOnly,BlueprintReadOnly)
class UCameraComponent* FollowCamera;
void MoveForward();
void MoveRight();
public:
//프레임마다 호출
virtual void Tick(float DeltaTime) override;
//함수 기능을 입력에 바인딩하기 위해 호출
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
};
ExampleCharacter.cpp
//디폴트값 설정
AExampleCharacter::AExampleCharacter()
{
//카메라 붐 초기화
CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));
//클래스의 루트 컴포넌트에 어태치먼트 설정
CameraBoom->SetupAttachment(RootComponent);
//PawnControlRotation 사용 부울을 true로 설정
CameraBoom->bUsePawnControlRotation = true;
//카메라 컴포넌트 초기화
FollowCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera"));
//카메라 붐에 대한 어태치먼트 설정
FollowCamera->SetupAttachment(CameraBoom);
}
//게임 시작 또는 스폰 시 호출
void AExampleCharacter::BeginPlay()
{
Super::BeginPlay();
}
void AExampleCharacter::MoveForward(float AxisValue)
{
if ((Controller != NULL) && (AxisValue != 0.0f))
{
//앞쪽 찾기
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
//앞쪽 벡터 구하기
const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
AddMovementInput(Direction, AxisValue);
}
}
void AExampleCharacter::MoveRight(float AxisValue)
{
if ((Controller != NULL) && (AxisValue != 0.0f))
{
//오른쪽 방향 찾기
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
//오른쪽 벡터 구하기
const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);
//해당 방향으로 이동 추가
AddMovementInput(Direction, AxisValue);
}
}
//프레임마다 호출
void AExampleCharacter::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
//함수 기능을 입력에 바인딩하기 위해 호출
void AExampleCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
//게임플레이 키 바인딩 설정
check(PlayerInputComponent);
PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump);
PlayerInputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping);
PlayerInputComponent->BindAxis("Move Forward", this, &AExampleCharacter::MoveForward);
PlayerInputComponent->BindAxis("Move Right", this, &AExampleCharacter::MoveRight);
}
캐릭터 블루프린트 생성하기
C++ 클래스(C++ Classes) 폴더에서 ExampleCharacter 를 우클릭하고 드롭다운 메뉴에서 ExampleCharacter 기반 블루프린트 클래스 생성(Create Blueprint class based on ExampleCharacter) 을 선택합니다. 블루프린트를 BP_ExampleCharacter 로 명명합니다.
컴포넌트(Components) 패널에서 메시(Mesh) 스켈레탈 메시 컴포넌트를 선택합니다.
디테일(Details) > 메시(Mesh) > 스켈레탈 메시(Skeletal Mesh) 의 드롭다운 메뉴를 펼칩니다. 탐색(Browse) 섹션의 세팅 아이콘을 클릭합니다. 그런 다음 컨텍스트 메뉴에서 콘텐츠(Content) > 엔진 콘텐츠 표시(Show Engine Content) 를 선택합니다.
TutorialTPP 스켈레탈 메시를 검색하고 선택합니다.
트랜스폼(Transform) 카테고리에서 위치(Location) 및 회전(Rotation) 벡터 값을 (0.0, 0.0, -90 )으로 설정합니다.

완성된 블루프린트
MoveForward
MoveRight
이벤트 그래프
게임 모드 블루프린트 생성
게임 모드는 게임의 규칙 세트를 정의합니다. 게임을 실행할 때 플레이어가 스폰되는 디폴트 폰(Pawn)도 이러한 규칙에 포함됩니다. 생성한 플레이어 캐릭터를 스폰하려면 규칙을 설정해야 합니다.
콘텐츠 드로어(Content Drawer) 에서 추가(+) 를 클릭하여 새 블루프린트 클래스(Blueprint Class) 를 생성한 다음 드롭다운 메뉴에서 게임 모드 베이스(Game Mode Base) 를 부모 클래스(Parent Class) 로 선택합니다. 게임 모드의 이름을 'BP_InputGameMode '로 변경합니다.
클래스 디폴트(Class Defaults) 의 클래스(Classes) > 디폴트 폰 클래스(Default Pawn Class) 에서 BP_ExampleCharacter 를 선택합니다.
컴파일(Compile) 하고 저장(Save) 합니다.
편집(Edit) > 프로젝트 세팅(Project Settings) > 맵 & 모드(Maps and Modes) 로 이동합니다. 기본 게임모드(Default GameMode) 를 BP_InputGameMode 로 설정합니다.
에디터(Editor) 로 이동하고 플레이(Play) 를 선택하여 에디터에서 플레이(Play in Editor) 합니다.
이제 W, A, S, D 키로 캐릭터 이동을 제어할 수 있습니다. 마우스를 움직이면 카메라가 움직이고, 스페이스 바를 누르면 캐릭터가 점프합니다.
게임 모드(GameMode)는 게임의 규칙 세트를 정의합니다. 게임을 실행할 때 플레이어가 스폰되는 디폴트 폰도 이러한 규칙에 포함됩니다. 생성한 플레이어 캐릭터를 스폰하려면 규칙을 설정해야 합니다.
콘텐츠 드로어(Content Drawer) 의 C++ 클래스(C++ Classes) 폴더에서 SettingUpInputGameModeBase 를 우클릭합니다. 그런 다음 드롭다운 메뉴에서 SettingUpInputGameModeBase 기반 블루프린트 클래스 생성(Create Blueprint Class Based on SettingUpInputGameModeBase) 을 선택합니다. 게임 모드 블루프린트의 이름을 'BP_InputGameMode '로 변경합니다.
클래스(Class) 디폴트에서 클래스(Classes) > 디폴트 폰 클래스(Default Pawn Class) 로 이동한 다음 BP_ExampleCharacter 를 선택합니다.
컴파일(Compile) 하고 저장(Save) 합니다.
편집(Edit) > 프로젝트 세팅(Project Settings) > 맵 & 모드(Maps and Modes) 로 이동합니다. 디폴트 게임 모드(Default GameMode) 를 BP_InputGameMode 로 설정합니다.
에디터(Editor) 로 이동하고 플레이(Play) 를 선택하여 에디터에서 플레이(Play in Editor) 합니다.
이제 W, A, S, D 키로 캐릭터 이동을 제어할 수 있습니다. 마우스를 움직이면 카메라가 움직이고, 스페이스 바를 누르면 캐릭터가 점프합니다.
결과