키맵핑(바인딩) 삭제 - PlayerInput 비우기, InputComponent 비우기
//PlayerInput 제거 - Controller = GetWorld()->GetFirstPlayerController();
UPlayerInput* PlayerInput = Controller->PlayerInput;
PlayerInput->AxisMappings.Empty(); //컨트롤러 인풋에 있는 Axis맵핑 비우기
PlayerInput->ActionMappings.Empty(); //콘트롤러 인풋에 있는 Action맵핑 비우기
// InputComponent 제거 - InputComponent = Character->GetInputComponent();
InputComponent->ClearBindingValues(); //소유한 AxisValue 초기화
InputComponent->ClearActionBindings(); //바인딩된 Action값 비우기
InputComponent->AxisBindings.Empty(); //바인딩된 Axis값 TArray 비우기
키맵핑을 하던 컨트롤러를 다른 곳으로 Pawn으로 옮겨 재사용하기 위해서는
그 플레이어 컨트롤에 들어있는 Input값을 초기화 해주어야 깔끔하다.
이동하기 전에 가지고 있던 InputComponent까지 지울 필요는 없었겠지만
깔끔하게 해보자고 해서 알아봤다.
혹시 키맵핑(바인딩) 설정 방법을 못보고 왔다면 아래 링크에 들어가 보자.
'공부 > Unreal4' 카테고리의 다른 글
Character(Pawn) Move Control(Not Possess) - AddMovementInput 함수에 대해 (0) | 2017.04.20 |
---|---|
실행(플레이) 창 크기, 창 시작점 구하기 - ffmpeg 로 원하는 영역만큼만 녹화해보자 (0) | 2017.04.19 |
언리얼4 c++프로그래밍 - 키맵핑(바인딩) 설정 (0) | 2017.04.17 |
언리얼 c++프로그래밍 - Controller의 Possess()함수에 대해 (0) | 2017.04.17 |
FindComponentByClass 의 위험성 (1) | 2017.04.14 |