Skip to content
Snippets Groups Projects
Commit 92348fce authored by Jonathan Ehret's avatar Jonathan Ehret
Browse files

fix MH eyes not gazing anymore

parent 0485b763
No related branches found
No related tags found
No related merge requests found
...@@ -294,14 +294,11 @@ void FAnimNode_VHGazing::ApplyRotation(FGazingBoneData& GazingBoneData, FRotator ...@@ -294,14 +294,11 @@ void FAnimNode_VHGazing::ApplyRotation(FGazingBoneData& GazingBoneData, FRotator
USkeleton* Skeleton = PoseContext.AnimInstanceProxy->GetSkeleton(); USkeleton* Skeleton = PoseContext.AnimInstanceProxy->GetSkeleton();
auto ApplyBlendshapeRotation = [&](float Angle, float FullAngle, FName PositiveBlendshape, FName NegativeBlendshape) auto ApplyBlendshapeRotation = [&](float Angle, float FullAngle, FName PositiveBlendshape, FName NegativeBlendshape)
{ {
SmartName::UID_Type NameUIDPositive = Skeleton->GetUIDByName(USkeleton::AnimCurveMappingName, PositiveBlendshape);
SmartName::UID_Type NameUIDNegative = Skeleton->GetUIDByName(USkeleton::AnimCurveMappingName, NegativeBlendshape);
float PositiveActivation = FMath::Clamp(Angle / FullAngle, 0.0f, 1.0f); float PositiveActivation = FMath::Clamp(Angle / FullAngle, 0.0f, 1.0f);
float NegativeActivation = FMath::Clamp(-1.0f * Angle / FullAngle, 0.0f, 1.0f); float NegativeActivation = FMath::Clamp(-1.0f * Angle / FullAngle, 0.0f, 1.0f);
PoseContext.Curve.Set(NameUIDPositive, PositiveActivation); PoseContext.Curve.Set(PositiveBlendshape, PositiveActivation);
PoseContext.Curve.Set(NameUIDNegative, NegativeActivation); PoseContext.Curve.Set(NegativeBlendshape, NegativeActivation);
//UE_LOG(LogTemp, Warning, TEXT("Angle %f Pos: %f, Neg: %f"), Angle, PositiveActivation, NegativeActivation); //UE_LOG(LogTemp, Warning, TEXT("Angle %f Pos: %f, Neg: %f"), Angle, PositiveActivation, NegativeActivation);
}; };
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment