midas+son의 크리에이티브(creative) 이야기


//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까지 지울 필요는 없었겠지만

깔끔하게 해보자고 해서 알아봤다.


혹시 키맵핑(바인딩) 설정 방법을 못보고 왔다면 아래 링크에 들어가 보자.

http://midason.tistory.com/418