Refactored Forward Facing anim data
This commit is contained in:
parent
bb5f9d2d87
commit
f3cb92782d
Binary file not shown.
@ -196,7 +196,7 @@ UAnimSequence* UOLSBaseLinkedLayerAnimInstance::SelectPivotAnimation(const bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
return GetGaitAnimSets(isCrouching, gait).GaitAnimSet_ForwardFacing.Pivot.GetLeftOrRightByAngle(
|
return GetGaitAnimSets(isCrouching, gait).GaitAnimSet_ForwardFacing.Pivot.GetLeftOrRightByAngle(
|
||||||
angle, bIsLeftFootFarFromTarget, bIsRightFootFarFromTarget);
|
angle, bIsRightFootFarFromTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
UAnimSequence* UOLSBaseLinkedLayerAnimInstance::SelectStopCycleAnimation(const bool isCrouching,
|
UAnimSequence* UOLSBaseLinkedLayerAnimInstance::SelectStopCycleAnimation(const bool isCrouching,
|
||||||
|
|||||||
@ -82,10 +82,14 @@ UAnimSequence* FOLSMovementAnimSet::GetMovementAnimationByCardinalDirection(cons
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
class UAnimSequence* FOLSMovementAnimSet_ForwardFacing_StartCycle::GetForwardLeftOrRightFoot(
|
class UAnimSequence* FOLSMovementAnimSet_FeetPosition::GetForwardLeftOrRightFoot(const bool isRightFootFarFromTarget) const
|
||||||
const bool isRightFootFront) const
|
|
||||||
{
|
{
|
||||||
return (isRightFootFront) ? Forward_R : Forward_L;
|
return (isRightFootFarFromTarget ? RightFoot : LeftFoot);
|
||||||
|
}
|
||||||
|
|
||||||
|
class UAnimSequence* FOLSMovementAnimSet_ForwardFacing_StartCycle::GetForwardLeftOrRightFoot(const bool isRightFootFarFromTarget) const
|
||||||
|
{
|
||||||
|
return Forward.GetForwardLeftOrRightFoot(isRightFootFarFromTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
UAnimSequence* FOLSMovementAnimSet_ForwardFacing_StartCycle::GetForward180LeftOrRightByAngle(const float angle) const
|
UAnimSequence* FOLSMovementAnimSet_ForwardFacing_StartCycle::GetForward180LeftOrRightByAngle(const float angle) const
|
||||||
@ -117,32 +121,17 @@ class UAnimSequence* FOLSMovementAnimSet_ForwardFacing_StartCycle::GetMovementAn
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FOLSMovementAnimSets_ForwardFacing_Pivot::GetLeftOrRightAnimSet(const bool isLeftFootPlanted,
|
|
||||||
const bool isRightFootPlanted, FOLSMovementAnimSet_ForwardFacing_Pivot& outAnimSet) const
|
|
||||||
{
|
|
||||||
if (isLeftFootPlanted)
|
|
||||||
{
|
|
||||||
outAnimSet = Pivot_LeftFoot;
|
|
||||||
}
|
|
||||||
else if (isRightFootPlanted)
|
|
||||||
{
|
|
||||||
outAnimSet = Pivot_RightFoot;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UAnimSequence* FOLSMovementAnimSets_ForwardFacing_StopCycle::GetLeftOrRightAnim(const bool isRightFootPlanted) const
|
UAnimSequence* FOLSMovementAnimSets_ForwardFacing_StopCycle::GetLeftOrRightAnim(const bool isRightFootPlanted) const
|
||||||
{
|
{
|
||||||
return (isRightFootPlanted ? StopCycle_RightFoot : StopCycle_LeftFoot);
|
return Stop.GetForwardLeftOrRightFoot(isRightFootPlanted);
|
||||||
}
|
}
|
||||||
|
|
||||||
class UAnimSequence* FOLSMovementAnimSets_ForwardFacing_Pivot::GetLeftOrRightByAngle(const float angle,
|
class UAnimSequence* FOLSMovementAnimSets_ForwardFacing_Pivot::GetLeftOrRightByAngle(const float angle,
|
||||||
const bool isLeftFootPlanted,
|
const bool isRightFootFarFromTarget) const
|
||||||
const bool isRightFootPlanted) const
|
|
||||||
{
|
{
|
||||||
FOLSMovementAnimSet_ForwardFacing_Pivot animSet;
|
return (angle > 0.f
|
||||||
GetLeftOrRightAnimSet(isLeftFootPlanted, isRightFootPlanted, animSet);
|
? Pivot180R.GetForwardLeftOrRightFoot(isRightFootFarFromTarget)
|
||||||
|
: Pivot180L.GetForwardLeftOrRightFoot(isRightFootFarFromTarget));
|
||||||
return (angle > 0.f) ? animSet.Pivot180R : animSet.Pivot180L;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FOLSGaitAnimSet::GetPlayRateByLocomotionState(const EOLSLocomotionStatePlayRate& state, FVector2D& outPlayRate) const
|
void FOLSGaitAnimSet::GetPlayRateByLocomotionState(const EOLSLocomotionStatePlayRate& state, FVector2D& outPlayRate) const
|
||||||
|
|||||||
@ -122,6 +122,25 @@ public:
|
|||||||
TObjectPtr<class UAnimSequence> Left = nullptr;
|
TObjectPtr<class UAnimSequence> Left = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
USTRUCT(BlueprintType)
|
||||||
|
struct FOLSMovementAnimSet_FeetPosition
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
class UAnimSequence* GetForwardLeftOrRightFoot(const bool isRightFootFarFromTarget) const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Anim Set")
|
||||||
|
TObjectPtr<class UAnimSequence> LeftFoot = nullptr;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Anim Set")
|
||||||
|
TObjectPtr<class UAnimSequence> RightFoot = nullptr;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
USTRUCT(BlueprintType)
|
USTRUCT(BlueprintType)
|
||||||
struct FOLSMovementAnimSet_ForwardFacing_StartCycle
|
struct FOLSMovementAnimSet_ForwardFacing_StartCycle
|
||||||
{
|
{
|
||||||
@ -129,19 +148,16 @@ struct FOLSMovementAnimSet_ForwardFacing_StartCycle
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
class UAnimSequence* GetForwardLeftOrRightFoot(const bool isRightFootFront) const;
|
class UAnimSequence* GetForwardLeftOrRightFoot(const bool isRightFootFarFromTarget) const;
|
||||||
class UAnimSequence* GetForward180LeftOrRightByAngle(const float angle) const;
|
class UAnimSequence* GetForward180LeftOrRightByAngle(const float angle) const;
|
||||||
class UAnimSequence* GetMovementAnimationByAngle(const EOLSCardinalDirection direction,
|
class UAnimSequence* GetMovementAnimationByAngle(const EOLSCardinalDirection direction,
|
||||||
const float angle,
|
const float angle,
|
||||||
const bool isRightFootFarFromTarget) const;
|
const bool isRightFootFarFromTarget) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Start Cycle Anim Set")
|
|
||||||
TObjectPtr<class UAnimSequence> Forward_L = nullptr;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Start Cycle Anim Set")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Start Cycle Anim Set")
|
||||||
TObjectPtr<class UAnimSequence> Forward_R = nullptr;
|
FOLSMovementAnimSet_FeetPosition Forward;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Start Cycle Anim Set")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Start Cycle Anim Set")
|
||||||
TObjectPtr<class UAnimSequence> Forward180_L = nullptr;
|
TObjectPtr<class UAnimSequence> Forward180_L = nullptr;
|
||||||
@ -162,12 +178,12 @@ struct FOLSMovementAnimSet_ForwardFacing_Pivot
|
|||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
||||||
TObjectPtr<class UAnimSequence> Pivot180L = nullptr;
|
FOLSMovementAnimSet_FeetPosition Pivot180L;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
||||||
TObjectPtr<class UAnimSequence> Pivot180R = nullptr;
|
FOLSMovementAnimSet_FeetPosition Pivot180R;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -176,24 +192,18 @@ struct FOLSMovementAnimSets_ForwardFacing_Pivot
|
|||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
void GetLeftOrRightAnimSet(const bool isLeftFootPlanted, const bool isRightFootPlanted,
|
|
||||||
FOLSMovementAnimSet_ForwardFacing_Pivot& outAnimSet) const;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
class UAnimSequence* GetLeftOrRightByAngle(const float angle,
|
class UAnimSequence* GetLeftOrRightByAngle(const float angle,
|
||||||
const bool isLeftFootPlanted,
|
const bool isRightFootFarFromTarget) const;
|
||||||
const bool isRightFootPlanted) const;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
||||||
FOLSMovementAnimSet_ForwardFacing_Pivot Pivot_LeftFoot;
|
FOLSMovementAnimSet_FeetPosition Pivot180L;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
||||||
FOLSMovementAnimSet_ForwardFacing_Pivot Pivot_RightFoot;
|
FOLSMovementAnimSet_FeetPosition Pivot180R;
|
||||||
};
|
};
|
||||||
|
|
||||||
USTRUCT(BlueprintType)
|
USTRUCT(BlueprintType)
|
||||||
@ -207,11 +217,8 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Stop Cycle Anim Set")
|
||||||
TObjectPtr<class UAnimSequence> StopCycle_LeftFoot;
|
FOLSMovementAnimSet_FeetPosition Stop;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Movement Pivot Anim Set")
|
|
||||||
TObjectPtr<class UAnimSequence> StopCycle_RightFoot;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
USTRUCT(BlueprintType)
|
USTRUCT(BlueprintType)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user