Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
URootMotionModifier_ControllableSkewWarp 클래스 참조

#include <RootMotionModifier_ControllableSkewWarp.h>

URootMotionModifier_ControllableSkewWarp에 대한 상속 다이어그램 :
Inheritance graph
URootMotionModifier_ControllableSkewWarp에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

 URootMotionModifier_ControllableSkewWarp (const FObjectInitializer &ObjectInitializer)
 
virtual FTransform ProcessRootMotion (const FTransform &InRootMotion, float DeltaSeconds) override
 
virtual void Update (const FMotionWarpingUpdateContext &Context) override
 
float CalculateNormalizedProgress (float WarpDuration) const
 

Protected 속성

FRuntimeFloatCurve RotationMultiplierCurve
 

Private 멤버 함수

bool ShouldSkipRotationWarp () const
 

상세한 설명

워프 정규화 진행도로 RotationMultiplierCurve를 평가해 워프 보정(이동/회전) 반영량을 제어한다. 배율 0이면 애니메이션 원본 루트모션 그대로, 1이면 워프 타겟에 정확히 도달한다.

생성자 & 소멸자 문서화

◆ URootMotionModifier_ControllableSkewWarp()

URootMotionModifier_ControllableSkewWarp::URootMotionModifier_ControllableSkewWarp ( const FObjectInitializer &  ObjectInitializer)
11 : Super(ObjectInitializer)
12{
13 FRichCurve* RichCurve = RotationMultiplierCurve.GetRichCurve();
14 RichCurve->AddKey(0.0f, 1.0f);
15 RichCurve->AddKey(1.0f, 1.0f);
16}
FRuntimeFloatCurve RotationMultiplierCurve
Definition RootMotionModifier_ControllableSkewWarp.h:34

멤버 함수 문서화

◆ CalculateNormalizedProgress()

float URootMotionModifier_ControllableSkewWarp::CalculateNormalizedProgress ( float  WarpDuration) const
60{
61 return WarpDuration < KINDA_SMALL_NUMBER ? 1.0f : FMath::Clamp((CurrentPosition - ActualStartTime) / WarpDuration, 0.0f, 1.0f);
62}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ProcessRootMotion()

FTransform URootMotionModifier_ControllableSkewWarp::ProcessRootMotion ( const FTransform &  InRootMotion,
float  DeltaSeconds 
)
overridevirtual
20{
21 FTransform WarpedRootMotion = Super::ProcessRootMotion(InRootMotion, DeltaSeconds);
22
24 {
25 return WarpedRootMotion;
26 }
27
28 const float WarpDuration = EndTime - ActualStartTime;
29 const float NormalizedProgress = CalculateNormalizedProgress(WarpDuration);
30 const float WarpMultiplier = RotationMultiplierCurve.GetRichCurveConst()->Eval(NormalizedProgress, 1.0f);
31
32 if (bWarpTranslation)
33 {
34 // 이동 워프 델타에도 배율을 적용해 도달 위치가 커브의 영향을 받게 한다.
35 // 배율 0이면 애니메이션 원본 루트모션(전방) 그대로, 1이면 타겟 위치에 정확히 도달한다.
36 const FVector OriginalTranslation = InRootMotion.GetTranslation();
37 const FVector TranslationWarpDelta = WarpedRootMotion.GetTranslation() - OriginalTranslation;
38 WarpedRootMotion.SetTranslation(OriginalTranslation + TranslationWarpDelta * WarpMultiplier);
39 }
40
41 if (bWarpRotation)
42 {
43 const FQuat OriginalRotation = InRootMotion.GetRotation();
44 const FQuat RotationWarpDelta = WarpedRootMotion.GetRotation() * OriginalRotation.Inverse();
45 const FQuat ScaledRotationWarpDelta = FQuat::Slerp(FQuat::Identity, RotationWarpDelta, WarpMultiplier).GetNormalized();
46 WarpedRootMotion.SetRotation(ScaledRotationWarpDelta * OriginalRotation);
47 }
48
49 return WarpedRootMotion;
50}
bool ShouldSkipRotationWarp() const
Definition RootMotionModifier_ControllableSkewWarp.cpp:65
float CalculateNormalizedProgress(float WarpDuration) const
Definition RootMotionModifier_ControllableSkewWarp.cpp:59
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ ShouldSkipRotationWarp()

bool URootMotionModifier_ControllableSkewWarp::ShouldSkipRotationWarp ( ) const
private
66{
67 AActor* Owner = GetActorOwner();
68
69 if (Owner == nullptr)
70 {
71 return false;
72 }
73
74 IAttackableInterface* AttackableInterface = Cast<IAttackableInterface>(Owner);
75
76 if (AttackableInterface && AttackableInterface->HasTargetingTarget(ETargetingMode::SoftTargeting)) //대상이 있으면 회전 워핑 제약을 스킵함.
77 {
78 return true;
79 }
80 else
81 {
82 return false;
83 }
84}
Definition AttackableInterface.h:21
virtual bool HasTargetingTarget(ETargetingMode)=0
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ Update()

void URootMotionModifier_ControllableSkewWarp::Update ( const FMotionWarpingUpdateContext &  Context)
overridevirtual
54{
55 Super::Update(Context);
56}

멤버 데이터 문서화

◆ RotationMultiplierCurve

FRuntimeFloatCurve URootMotionModifier_ControllableSkewWarp::RotationMultiplierCurve
protected

Warp multiplier evaluated using the normalized Motion Warping progress. Applied to both translation and rotation warp.


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: