apply SenseGlove VRExpansionPlugin patches
This commit is contained in:
+16
-4
@@ -393,11 +393,17 @@ void UGripMotionControllerComponent::GetCurrentProfileTransform(bool bBindToNoti
|
|||||||
|
|
||||||
FTransform NewControllerProfileTransform = FTransform::Identity;
|
FTransform NewControllerProfileTransform = FTransform::Identity;
|
||||||
|
|
||||||
if (HandType == EControllerHand::Left || HandType == EControllerHand::AnyHand || !VRSettings->bUseSeperateHandTransforms)
|
/// SENSEGLOVE PATCH - BEGIN
|
||||||
|
//if (HandType == EControllerHand::Left || HandType == EControllerHand::AnyHand || !VRSettings->bUseSeperateHandTransforms)
|
||||||
|
if (UEnum::GetDisplayValueAsText(HandType).ToString().Contains("Left") || HandType == EControllerHand::AnyHand || !VRSettings->bUseSeperateHandTransforms)
|
||||||
|
/// SENSEGLOVE PATCH - END
|
||||||
{
|
{
|
||||||
NewControllerProfileTransform = VRSettings->CurrentControllerProfileTransform;
|
NewControllerProfileTransform = VRSettings->CurrentControllerProfileTransform;
|
||||||
}
|
}
|
||||||
else if (HandType == EControllerHand::Right)
|
/// SENSEGLOVE PATCH - BEGIN
|
||||||
|
//else if (HandType == EControllerHand::Right)
|
||||||
|
else if (UEnum::GetDisplayValueAsText(HandType).ToString().Contains("Right"))
|
||||||
|
/// SENSEGLOVE PATCH - END
|
||||||
{
|
{
|
||||||
NewControllerProfileTransform = VRSettings->CurrentControllerProfileTransformRight;
|
NewControllerProfileTransform = VRSettings->CurrentControllerProfileTransformRight;
|
||||||
}
|
}
|
||||||
@@ -8348,12 +8354,18 @@ void UGripMotionControllerComponent::GetHandType(EControllerHand& Hand)
|
|||||||
{
|
{
|
||||||
// Check if the palm motion source extension is being used
|
// Check if the palm motion source extension is being used
|
||||||
// I assume eventually epic will handle this case
|
// I assume eventually epic will handle this case
|
||||||
if (MotionSource.Compare(FName(TEXT("RightPalm"))) == 0 || MotionSource.Compare(FName(TEXT("RightWrist"))) == 0)
|
/// SENSEGLOVE PATCH - BEGIN
|
||||||
|
//if (MotionSource.Compare(FName(TEXT("RightPalm"))) == 0 || MotionSource.Compare(FName(TEXT("RightWrist"))) == 0)
|
||||||
|
if (MotionSource.Compare(FName(TEXT("RightPalm"))) == 0 || MotionSource.Compare(FName(TEXT("RightWrist"))) == 0 || MotionSource.ToString().Contains("Right"))
|
||||||
|
/// SENSEGLOVE PATCH - END
|
||||||
{
|
{
|
||||||
Hand = EControllerHand::Right;
|
Hand = EControllerHand::Right;
|
||||||
}
|
}
|
||||||
// Could skip this and default to left now but would rather check
|
// Could skip this and default to left now but would rather check
|
||||||
else if (MotionSource.Compare(FName(TEXT("LeftPalm"))) == 0 || MotionSource.Compare(FName(TEXT("LeftWrist"))) == 0)
|
/// SENSEGLOVE PATCH - BEGIN
|
||||||
|
//else if (MotionSource.Compare(FName(TEXT("LeftPalm"))) == 0 || MotionSource.Compare(FName(TEXT("LeftWrist"))) == 0)
|
||||||
|
else if (MotionSource.Compare(FName(TEXT("LeftPalm"))) == 0 || MotionSource.Compare(FName(TEXT("LeftWrist"))) == 0 || MotionSource.ToString().Contains("Left"))
|
||||||
|
/// SENSEGLOVE PATCH - END
|
||||||
{
|
{
|
||||||
Hand = EControllerHand::Left;
|
Hand = EControllerHand::Left;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -345,7 +345,10 @@ bool UHandSocketComponent::GetBlendedPoseSnapShot(FPoseSnapshot& PoseSnapShot, U
|
|||||||
|
|
||||||
if (TrackIndex != INDEX_NONE && (!bSkipRootBone || TrackIndex != 0))
|
if (TrackIndex != INDEX_NONE && (!bSkipRootBone || TrackIndex != 0))
|
||||||
{
|
{
|
||||||
double TrackLocation = 0.0f;
|
/// SENSEGLOVE PATCH - BEGIN
|
||||||
|
//double TrackLocation = 0.0f;
|
||||||
|
double TrackLocation = HandTargetAnimation->GetPlayLength() * HandAnimationProgress;
|
||||||
|
/// SENSEGLOVE PATCH - END
|
||||||
HandTargetAnimation->GetBoneTransform(LocalTransform, FSkeletonPoseBoneIndex(TrackMap[TrackIndex].BoneTreeIndex), TrackLocation, false);
|
HandTargetAnimation->GetBoneTransform(LocalTransform, FSkeletonPoseBoneIndex(TrackMap[TrackIndex].BoneTreeIndex), TrackLocation, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
+5
@@ -189,6 +189,11 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Animation")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Animation")
|
||||||
TObjectPtr<UAnimSequence> HandTargetAnimation;
|
TObjectPtr<UAnimSequence> HandTargetAnimation;
|
||||||
|
|
||||||
|
/// SENSEGLOVE PATCH - BEGIN
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Animation")
|
||||||
|
float HandAnimationProgress = 0.0f;
|
||||||
|
/// SENSEGLOVE PATCH - END
|
||||||
|
|
||||||
// Scale to apply when mirroring the hand, adjust to visualize your off hand correctly
|
// Scale to apply when mirroring the hand, adjust to visualize your off hand correctly
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Socket Data|Mirroring")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Socket Data|Mirroring")
|
||||||
FVector MirroredScale;
|
FVector MirroredScale;
|
||||||
|
|||||||
Reference in New Issue
Block a user