You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fix clamp linear translation limit causing jittering in some assets.
[FYI] Benn.Gallagher #ROBOMERGE-SOURCE: CL 5768103 via CL 5768104 via CL 5768828 via CL 5770632 [CL 5770745 by satchit subramanian in Main branch]
This commit is contained in:
@@ -197,6 +197,7 @@ void FAnimNode_RigidBody::InitializeNewBodyTransformsDuringSimulation(FComponent
|
||||
|
||||
const FTransform WSBodyTM = BodyRelativeTransform * Bodies[OutputData.ParentBodyIndex]->GetWorldTransform();
|
||||
Bodies[BodyIndex]->SetWorldTransform(WSBodyTM);
|
||||
BodyAnimData[BodyIndex].RefPoseLength = BodyRelativeTransform.GetLocation().Size();
|
||||
}
|
||||
// If we don't have a parent body, then we can just grab the incoming pose in component space.
|
||||
else
|
||||
@@ -323,6 +324,10 @@ void FAnimNode_RigidBody::EvaluateSkeletalControl_AnyThread(FComponentSpacePoseC
|
||||
|
||||
BodyTM = ConvertCSTransformToSimSpace(SimulationSpace, ComponentSpaceTM, CompWorldSpaceTM, BaseBoneTM);
|
||||
Bodies[BodyIndex]->SetWorldTransform(BodyTM);
|
||||
if (OutputData.ParentBodyIndex != INDEX_NONE)
|
||||
{
|
||||
BodyAnimData[BodyIndex].RefPoseLength = BodyTM.GetRelativeTransform(Bodies[OutputData.ParentBodyIndex]->GetWorldTransform()).GetLocation().Size();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -338,6 +343,10 @@ void FAnimNode_RigidBody::EvaluateSkeletalControl_AnyThread(FComponentSpacePoseC
|
||||
const FTransform& ComponentSpaceTM = Output.Pose.GetComponentSpaceTransform(OutputData.CompactPoseBoneIndex);
|
||||
const FTransform BodyTM = ConvertCSTransformToSimSpace(SimulationSpace, ComponentSpaceTM, CompWorldSpaceTM, BaseBoneTM);
|
||||
Bodies[BodyIndex]->SetWorldTransform(BodyTM);
|
||||
if (OutputData.ParentBodyIndex != INDEX_NONE)
|
||||
{
|
||||
BodyAnimData[BodyIndex].RefPoseLength = BodyTM.GetRelativeTransform(Bodies[OutputData.ParentBodyIndex]->GetWorldTransform()).GetLocation().Size();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user