Renamed GetDistanceCurveValueAtTime by GetCurveValueAtTime
This commit is contained in:
parent
127ee5de51
commit
a2436e5c65
@ -555,7 +555,7 @@ void UOLSBaseLayerAnimInstance::ProcessTurnYawCurve_ForwardFacing()
|
||||
{
|
||||
float previousTurnYawCurveValue = TurnYawCurveValue;
|
||||
const float turnYawWeightCurveValue = GetCurveValue(TurnYawWeightCurveName);
|
||||
if (FMath::IsNearlyZero(turnYawWeightCurveValue, 0.0001f))
|
||||
if (FMath::IsNearlyZero(turnYawWeightCurveValue, KINDA_SMALL_NUMBER))
|
||||
{
|
||||
TurnYawCurveValue = 0.f;
|
||||
previousTurnYawCurveValue = 0.f;
|
||||
|
@ -48,9 +48,9 @@ float UOLSLocomotionBPLibrary::FindPivotTime(const UAnimSequenceBase* animSequen
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
float UOLSLocomotionBPLibrary::GetDistanceCurveValueAtTime(const UAnimSequenceBase* animSequence,
|
||||
const float time,
|
||||
const FName& curveName)
|
||||
float UOLSLocomotionBPLibrary::GetCurveValueAtTime(const UAnimSequenceBase* animSequence,
|
||||
const float time,
|
||||
const FName& curveName)
|
||||
{
|
||||
FAnimCurveBufferAccess bufferCurveAccess(animSequence, curveName);
|
||||
if (bufferCurveAccess.IsValid())
|
||||
@ -146,8 +146,8 @@ float UOLSLocomotionBPLibrary::GetTimeAfterDistanceTraveled(const UAnimSequenceB
|
||||
// Traverse the distance curve, accumulating animated distance until the desired distance is reached.
|
||||
while ((accumulatedDistance < distanceTraveled) && (shouldAllowLooping || (newTime + stepTime < sequenceLength)))
|
||||
{
|
||||
const float currentDistance = GetDistanceCurveValueAtTime(animSequence, newTime, curveName);
|
||||
const float distanceAfterStep = GetDistanceCurveValueAtTime(animSequence, newTime + stepTime, curveName);
|
||||
const float currentDistance = GetCurveValueAtTime(animSequence, newTime, curveName);
|
||||
const float distanceAfterStep = GetCurveValueAtTime(animSequence, newTime + stepTime, curveName);
|
||||
const float animationDistanceThisStep = distanceAfterStep - currentDistance;
|
||||
|
||||
if (!FMath::IsNearlyZero(animationDistanceThisStep))
|
||||
@ -281,7 +281,7 @@ FSequenceEvaluatorReference UOLSLocomotionBPLibrary::DistanceMatchToTarget(const
|
||||
{
|
||||
if (const UAnimSequenceBase* animSequence = inSequenceEvaluator.GetSequence())
|
||||
{
|
||||
if (GetDistanceCurveValueAtTime(animSequence,
|
||||
if (GetCurveValueAtTime(animSequence,
|
||||
USequenceEvaluatorLibrary::GetAccumulatedTime(sequenceEvaluator),
|
||||
curveName) > stopDistanceThreshHold && !shouldDistanceMatchStop)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
static float FindPivotTime(const UAnimSequenceBase* animSequence, const float sampleRate);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "OLS|Function Library", meta=(BlueprintThreadSafe))
|
||||
static float GetDistanceCurveValueAtTime(const UAnimSequenceBase* animSequence, const float time, const FName& curveName);
|
||||
static float GetCurveValueAtTime(const UAnimSequenceBase* animSequence, const float time, const FName& curveName);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "OLS|Function Library", meta=(BlueprintThreadSafe))
|
||||
static float GetTimeAtDistance(const UAnimSequenceBase* animSequence, const float& distance, FName curveName);
|
||||
|
Loading…
Reference in New Issue
Block a user