확장 API
CAT는 두 가지 주요 Blueprint 확장 모델을 제공합니다. Blueprint가 작성된 위치뿐 아니라 수명과 출력 방식에 따라 선택하세요.
| 확장 모델 | 수명 | 용도 |
|---|---|---|
| Assembly Controller | 활성 Control Session마다 하나의 UObject | 완전한 Motor와 Fan 출력 프레임을 생성하는 연속 입력 |
| Part Gameplay Feature | Part Instance와 Feature ID 조합마다 하나의 UObject | Part 단위 생명주기 동작과 개별 게임플레이 액션 |
Assembly Controller
Assembly Controller는 Control Session이 활성화된 동안에만 실행됩니다. Control Station에서 의미 기반 Slot 값을 받고 CAT가 예약한 Controller Update에서 Actuator 출력을 기록합니다.
입력 계약과 전달 과정
- Controller Class Defaults에서 의미 기반 Input Slot을 선언합니다. 각 Slot에는 안정적인 ID, 필요한 값 형식, Tooltip, 필수 여부가 있습니다.
- Control Station에서 각 Slot에 Input Action을 지정합니다.
- 플레이어 입력을 해당 Action으로 매핑하는 활성 Input Mapping Context를 제공합니다.
- Control Session 동안 Assembly Interactor가 Action 값을 대응하는 Controller Slot으로 전달합니다.
Input Slot은 Move, Throttle, Attitude 같은 의도를 나타내며 키보드나 장치 매핑을 정의하지 않습니다.
생명주기 이벤트
On Controller Started: 세션 소유 Controller가 초기화된 뒤 한 번 호출됩니다.On Controller Update: 현재 입력을 읽고 완전한 Actuator 출력 프레임을 기록합니다. 전달된Delta Seconds를 사용하며 일반 Event Tick이 아닙니다.On Controller Stopped: Controller 인스턴스가 해제되기 전에 중지 사유와 함께 호출됩니다.
입력 및 상태 조회
CAT Get Input BoolCAT Get Input Axis 1D,2D,3DCAT Was Input Started,CAT Was Input Released- Control Transform, 기준 방향, View Forward 방향
- Control Body Transform, 선형·각속도, Local Velocity, Speed
Actuator 조회
CAT Find Motors,CAT Find FansCAT Find Actuators By Tag,CAT Find Actuators By Part- Actuator Axis, Position, Body Transform, 선형 속도, 각속도
- Actuator Auto Control Strength
Actuator Handle은 생성한 Controller 인스턴스, Control Session, Assembly Revision에서만 유효합니다. Assembly 구조가 변경되면 다시 찾아야 합니다.
출력 트랜잭션
출력 함수는 On Controller Update 안에서만 유효합니다. 예약된 업데이트를 Event Tick으로 대체하지 말고 현재 프레임에 필요한 모든 Actuator 값을 기록하세요.
CAT Set Actuator Input,CAT Clear Actuator InputCAT Set Motor Input,CAT Set Fan Input- Motor Torque Multiplier와 Fan World-Up Projection 고급 출력
CAT Apply Axis Heading Motor Control- 내장 Watercraft 및 Aircraft 회전 제어 Helper
내장 Controller 클래스
- CAT Ground Drive Controller
- CAT Aircraft Controller
- CAT Watercraft Controller
입력 계약과 동작이 이미 적합하다면 내장 클래스를 상속하고 Class Default Settings를 조정하세요. 다른 Slot 계약이나 Actuator 알고리즘이 필요하면 CAT Assembly Controller를 직접 상속하세요.
Part Gameplay Feature
Part Gameplay Feature는 기능마다 별도 Actor를 만들지 않고 Part Model에 동작을 연결합니다. CAT는 Part Instance와 Feature ID 조합마다 하나의 런타임 Feature 인스턴스를 만듭니다.
저작 및 입력 전달
- Feature Class Defaults에서 의미 기반 Input Slot을 선언합니다.
- Part Model에 Gameplay Behavior 정의를 추가하고 Feature Class를 선택합니다.
- 각 Slot에 Input Action과 Server Delivery 정책을 지정합니다.
- 해당 Action을 위한 활성 Input Mapping Context를 제공합니다.
- 활성 Control Session 동안 Assembly Interactor가 일치하는 Action을 Feature로 전달합니다.
Slot별 입력에는 CAT Gameplay Input: SlotId Blueprint 이벤트를 사용합니다. Receive Gameplay Input은 이에 대응하는 일반 Override입니다. 기존 직접 InputActions와 CAT Input Action 노드는 마이그레이션을 위해 지원되지만 더 이상 권장되지 않습니다.
생명주기 이벤트
On Feature Activated: 런타임 Feature 인스턴스가 Part에 연결된 뒤 임시 상태를 초기화합니다.CAT Gameplay Input: SlotId/Receive Gameplay Input: 의미 기반 Slot ID, Action 값, Enhanced Input Trigger Event를 받습니다.On Feature Deactivated: Delegate, Timer, 임시 리소스를 해제합니다.
런타임 Context
- 소유 Assembly와 Part
- Feature ID
- 현재 Control Station Part
- Control Instigator
- 소유 Part World Transform
서버 전달
각 Input Binding은 Started, Ongoing, Triggered, Completed, Canceled별로 Disabled, Reliable, Unreliable 전달 방식을 지정합니다. 기본값은 모든 이벤트에서 Reliable입니다.
Gameplay Feature 입력은 발사, 활성화, 토글, 해제 같은 동작에 적합합니다. 완전한 Actuator 출력 프레임을 계속 생성해야 하는 조향, 추진, 자세 제어에는 Assembly Controller를 사용하세요.