본문 바로가기

Unreal

[Unreal] Lyra 프로젝트 분석 - 05. Input

Input Action

입력을 받을 시 행동(반환 값 등)

 

Input Mapping Context

키 입력과 Input Action을 매핑함 

Action에 들어갈 값을 Modifier로 수정 가능 (ex.W 누를 시 y축 양의방향 값)

 

DlkInputAction

InputAction과 게임플레이 태그를 묶는 구조체

 

DlkInputConfig

DlkInputAction Array를 들고 있으며 게임플레이 태그로 InputAction을 찾아준다.

이동과 같이 기본적인 액션들은 NativeInputAction, 사격이나 스킬 같은 추가 능력 액션들은 AbilityInputAction에 저장된다.

PawnData가 들고 있다.

 

InputComponent::BindAction

InputAction이 Trigger되었을 때 실행될 함수를 지정한다.

 

HeroComponent::InitializePlayerInput

PawnData에서 InputConfig를 가져오고 InputMappingContext를 추가한다.

그리고  게임플레이 태그에 맞는 액션이 트리거 됐을 때 바인드한 함수가 실행된다.