You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed. #ushell-cherrypick of 21065896 by bryan.sefcik #preflight 62d4b1a5a6141b6adfb0c892 #jira #ROBOMERGE-OWNER: Bryan.sefcik #ROBOMERGE-AUTHOR: bryan.sefcik #ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) #ROBOMERGE-CONFLICT from-shelf [CL 21181076 by Bryan sefcik in ue5-main branch]
48 lines
2.2 KiB
C
48 lines
2.2 KiB
C
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/ArrayView.h"
|
|
#include "Engine/SpringInterpolator.h"
|
|
#include "Math/Transform.h"
|
|
#include "Math/UnrealMathSSE.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
|
|
#include "BoneControllerSolvers.generated.h"
|
|
|
|
USTRUCT(BlueprintInternalUseOnly)
|
|
struct ANIMGRAPHRUNTIME_API FIKFootPelvisPullDownSolver
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
// Specifies the spring interpolation parameters applied during pelvis adjustment
|
|
UPROPERTY(EditAnywhere, Category=Settings)
|
|
FVectorRK4SpringInterpolator PelvisAdjustmentInterp;
|
|
|
|
// Specifies an alpha between the original and final adjusted pelvis locations
|
|
// This is used to retain some degree of the original pelvis motion
|
|
UPROPERTY(EditAnywhere, Category=Settings, meta=(ClampMin="0.0", ClampMax="1.0"))
|
|
float PelvisAdjustmentInterpAlpha = 0.5f;
|
|
|
|
// Specifies the maximum displacement the pelvis can be adjusted relative to its original location
|
|
UPROPERTY(EditAnywhere, Category=Settings, meta=(ClampMin="0.0"))
|
|
float PelvisAdjustmentMaxDistance = 10.f;
|
|
|
|
// Specifies the pelvis adjustment distance error that is tolerated for each iteration of the solver
|
|
//
|
|
// When it is detected that the pelvis adjustment distance is incrementing at a value lower or equal
|
|
// to this value for each iteration, the solve will halt. Lower values will marginally increase visual
|
|
// quality at the cost of performance, but may require a higher PelvisAdjustmentMaxIter to be specified
|
|
//
|
|
// The default value of 0.01 specifies 1 centimeter of error
|
|
UPROPERTY(EditAnywhere, Category=Advanced, meta=(ClampMin="0.001"))
|
|
float PelvisAdjustmentErrorTolerance = 0.01f;
|
|
|
|
// Specifies the maximum number of iterations to run for the pelvis adjustment solver
|
|
// Higher iterations will guarantee closer PelvisAdjustmentErrorTolerance convergence at the cost of performance
|
|
UPROPERTY(EditAnywhere, Category=Advanced, meta=(ClampMin="0"))
|
|
int32 PelvisAdjustmentMaxIter = 3;
|
|
|
|
// Iteratively pulls the character pelvis towards the ground based on the relationship of driven IK foot targets versus FK foot limits
|
|
FTransform Solve(FTransform PelvisTransform, TArrayView<const float> FKFootDistancesToPelvis, TArrayView<const FVector> IKFootLocations, float DeltaTime);
|
|
}; |