콘텐츠로 이동

UOverAnimComponent: Automatic Motion과 Pose Snapshot

헤더: OverAnimation/Runtime/OverAnimComponent.h

Automatic Motion API는 gameplay이 명시적으로 여는 non-Montage action 경계를 motion analyzer에 전달합니다. 일반 Anim Blueprint state transition은 Rebase On Anim State Transitions가 켜져 있으면 Component가 자동 감지해 derivative를 재기준화합니다. Pose Snapshot API는 Component가 자동 수집하는 bone transform 대신 외부 component-space pose를 넣는 C++/Blueprint 통합 경로입니다.

Automatic Six-Stage Motion API

Blueprint 이름 C++ 선언 입력 반환 전제 조건·거부 및 상태 변화
Start New Automatic Motion Action void StartNewAutomaticMotionAction(FName ActionContext = NAME_None) 선택적인 action context 없음 현재 automatic six-stage cycle의 새 action boundary를 대기열에 넣습니다. 다음 motion analysis에서 기존 active motion-phase state를 종료하고 새 animation-motion baseline을 seed합니다. 호출 즉시 Response를 생성하지 않습니다.
Cancel Automatic Motion Action void CancelAutomaticMotionAction(FName ActionContext = NAME_None) 선택적인 action context 없음 현재 cycle의 cancel boundary를 대기열에 넣습니다. 다음 motion analysis에서 active state를 종료하고 cancelled-action baseline으로 reset합니다. 호출 즉시 Response를 생성하지 않습니다.

두 함수는 return 값을 갖지 않으며, 모션 분석 설정이 꺼져 있거나 runtime manager가 준비되지 않은 상태에서는 나중 분석 단계가 없는 한 boundary가 effect로 전개되지 않습니다.

Analyze Automatic Stages = Only During Montage or Explicit Action에서는 Start New Automatic Motion Action이 explicit action window를 엽니다. Montage boundary가 동시에 활성 상태이면 한 source가 닫혀도 다른 action window가 남아 있는 동안 analyzer는 유지됩니다. 정상 Montage blend-out은 Montage 종료까지 유지되고, 중단된 Montage만 blend-out에서 즉시 닫힙니다.

Pose Snapshot API

Blueprint 이름 C++ 선언 입력 반환 전제 조건·거부 및 상태 변화
Get Required OverAnim Pose Snapshot Bones bool GetRequiredOverAnimPoseSnapshotBones(TArray<FName>& OutBoneNames) const 출력 bone-name 배열 하나 이상 있으면 true 먼저 OutBoneNames를 비웁니다. runtime manager가 없으면 false입니다. manager가 요구하는 control-point source bone의 중복 없는 목록을 반환하며, 비어 있으면 false입니다.
Submit OverAnim Component Space Pose Snapshot bool SubmitOverAnimComponentSpacePoseSnapshot(const TArray<FName>& SourceBoneNames, const TArray<FTransform>& SourceBoneComponentSpaceTransforms, FTransform ComponentTransform, double SampleTimeSeconds) bone 이름 배열, 같은 길이의 component-space transform 배열, component transform, sample time 수락 시 true manager를 해석하지 못하면 false입니다. 배열 길이는 같아야 하며 모든 bone 이름은 None이 아니고 모든 transform·component transform·sample time은 유효한 유한수여야 합니다. required control point마다 source 배열에 같은 bone이 있어야 합니다. sample time이 이전에 수락되었거나 소비된 snapshot보다 과거면 거부됩니다. 같은 미소 time의 아직 소비되지 않은 snapshot은 최신 snapshot을 갱신하고 true를 반환합니다.

C++ 자동 제출 제어

C++ 선언 입력 / 반환 동작
void SetAutomaticPoseSnapshotSubmissionEnabled(bool bEnabled) enable flag / 없음 Component가 BoneTransformsFinalized에서 자동으로 source pose를 제출할지 전환합니다. asset 적용 중 켜면 snapshot source를 bind하고, 끄면 unbind합니다. 외부 snapshot 필요 상태도 manager에 반영합니다.

자동 제출은 현재 Target Mesh에서 required bone 이름을 찾고, 각 bone의 component-space transform과 mesh component transform, world time을 제출합니다. required bone이 없거나 누락되어도 Component는 성공을 만들어 내지 않습니다.

Editor-only C++ API

다음 함수는 WITH_EDITOR 빌드에서만 공개됩니다. 런타임 게임 통합 API가 아닙니다.

C++ 선언 입력 반환 전제 조건·상태 변화
bool AdvanceEditorPreviewRegionMotionAnalysis(double SampleTimeSeconds) preview sample time 분석 가능하면 true manager, motion settings, bEnableMotionSignals, bEnableRegionMotionSignals, 유한 sample time이 필요합니다. 조건을 만족하지 않으면 motion signal state를 reset하고 false입니다.
void ResetEditorPreviewMotionAnalysis() 없음 없음 pending automatic boundary와 motion signal state를 reset합니다.