15 Commits
Author SHA1 Message Date
olav af6f920e64 renamed an offset for clearer naming 2025-06-22 10:50:21 +02:00
olav f99979cf21 Updated the calibration scene and added some more information in the read me 2025-06-22 10:47:43 +02:00
Mamadou Babaei 71e7bc2e1e bump the senseglove unreal engine plugin to v2.6.1 2025-06-05 14:51:00 +02:00
Mamadou Babaei 6dbb900c32 bump the senseglove unreal engine plugin to v2.6.0 2025-06-04 04:24:19 +02:00
olav 1f6b2555e7 Alpha version of the callibration and more documentation 2025-05-20 19:20:21 +02:00
olav 94fc3cb5f4 added vive wrist tracker offsets to this project 2025-05-15 08:15:35 +02:00
olav 50faf74daf updated the VRE Assets to latest version used in the ELDC demo 2025-04-29 10:44:47 +02:00
olav 936f2cb020 Updated pluigin so that it correctly gets your hand and tracking offset 2025-04-17 13:58:55 +02:00
Mamadou Babaei a35f8e2cef bump the senseglove unreal engine plugin to v2.4.2 2025-02-17 14:00:21 +01:00
Mamadou Babaei 9b00e26f6b bump the senseglove unreal engine plugin to v2.4.1 2025-02-14 16:34:05 +01:00
Mamadou Babaei 4ba3b2a365 use the stable release documentation urls instead of next 2025-02-14 14:31:42 +01:00
Mamadou Babaei a9bfc42784 bump the senseglove unreal engine plugin to v2.4.0 2025-02-14 13:31:35 +01:00
Mamadou Babaei 7694aff7a2 add an important note about branches and compatibility 2025-02-13 20:42:47 +01:00
Mamadou Babaei 7f31e1c2cb apply quest 3 pcvr wrist-tracking settings 2025-02-13 16:24:39 +01:00
Mamadou Babaei 6070681d21 apply generic rendering optimizations 2025-02-12 17:19:43 +01:00
39 changed files with 156 additions and 132 deletions
+5 -4
View File
@@ -37,14 +37,14 @@ ConfiguredLanSpeed=20000
net.IsPushModelEnabled=1
[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/SenseGlove/Maps/Calibration.Calibration
EditorStartupMap=/Game/Senseglove/Maps/SensegloveDemoMap.SensegloveDemoMap
LocalMapOptions=
TransitionMap=
bUseSplitscreen=False
TwoPlayerSplitscreenLayout=Horizontal
ThreePlayerSplitscreenLayout=FavorTop
GameInstanceClass=/Game/VRE/Core/VRGameInstance.VRGameInstance_C
GameDefaultMap=/Game/SenseGlove/Maps/Calibration.Calibration
GameDefaultMap=/Game/Senseglove/Maps/Calibration.Calibration
ServerDefaultMap=/Engine/Maps/Entry
GlobalDefaultGameMode=/Game/VRE/Core/VRGameMode.VRGameMode_C
GlobalDefaultServerGameMode=None
@@ -270,8 +270,9 @@ OneEuroDeltaCutoff=10.000000
+ControllerProfiles=(ControllerName="Windows_MR",SocketOffsetTransform=(Rotation=(X=0.000000,Y=-0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),bUseSeperateHandOffsetTransforms=True,SocketOffsetTransformRightHand=(Rotation=(X=0.000000,Y=-0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)))
+ControllerProfiles=(ControllerName="FPS_Pawn",SocketOffsetTransform=(Rotation=(X=0.000000,Y=-0.573576,Z=0.000000,W=0.819152),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),bUseSeperateHandOffsetTransforms=False,SocketOffsetTransformRightHand=(Rotation=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)))
+ControllerProfiles=(ControllerName="KnucklesEV2",SocketOffsetTransform=(Rotation=(X=-0.000000,Y=-0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),bUseSeperateHandOffsetTransforms=True,SocketOffsetTransformRightHand=(Rotation=(X=0.000000,Y=-0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)))
+ControllerProfiles=(ControllerName="SenseGlove_Quest3",SocketOffsetTransform=(Rotation=(X=-0.892539,Y=-0.157379,Z=-0.416198,W=0.073387),Translation=(X=-4.000000,Y=-11.000000,Z=2.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),bUseSeperateHandOffsetTransforms=True,SocketOffsetTransformRightHand=(Rotation=(X=-0.892539,Y=0.157379,Z=-0.416198,W=-0.073387),Translation=(X=-4.000000,Y=11.000000,Z=2.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)))
+ControllerProfiles=(ControllerName="SenseGlove_ViveWristTrackers",SocketOffsetTransform=(Rotation=(X=-0.523479,Y=0.239911,Z=-0.197710,W=0.793299),Translation=(X=13.000000,Y=0.000000,Z=-10.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),bUseSeperateHandOffsetTransforms=True,SocketOffsetTransformRightHand=(Rotation=(X=0.566416,Y=0.103732,Z=0.293063,W=0.763234),Translation=(X=-13.000000,Y=0.000000,Z=-10.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)))
+ControllerProfiles=(ControllerName="Senseglove_Quest3",SocketOffsetTransform=(Rotation=(X=-0.892539,Y=-0.157379,Z=-0.416198,W=0.073387),Translation=(X=-4.000000,Y=-11.000000,Z=2.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),bUseSeperateHandOffsetTransforms=True,SocketOffsetTransformRightHand=(Rotation=(X=-0.892539,Y=0.157379,Z=-0.416198,W=-0.073387),Translation=(X=-4.000000,Y=11.000000,Z=2.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)))
+ControllerProfiles=(ControllerName="SG_ViveWristTrackers",SocketOffsetTransform=(Rotation=(X=-0.523479,Y=0.239911,Z=-0.197710,W=0.793299),Translation=(X=13.000000,Y=0.000000,Z=-10.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),bUseSeperateHandOffsetTransforms=True,SocketOffsetTransformRightHand=(Rotation=(X=0.566416,Y=0.103732,Z=0.293063,W=0.763234),Translation=(X=-13.000000,Y=0.000000,Z=-10.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)))
+ControllerProfiles=(ControllerName="",SocketOffsetTransform=(Rotation=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),bUseSeperateHandOffsetTransforms=False,SocketOffsetTransformRightHand=(Rotation=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=0.000000,Z=0.000000),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)))
[/Script/Engine.PhysicsSettings]
DefaultGravityZ=-980.000000
+2 -2
View File
@@ -1,8 +1,8 @@
[/Script/EngineSettings.GeneralProjectSettings]
ProjectID=567B108A44C2B2D804F0208CBFD47729
ProjectName=SenseGlove VRExpansion Demo
ProjectName=Senseglove VRExpansion Demo
bStartInVR=True
CopyrightNotice=Copyright (c) 2020 - 2005 SenseGlove. All rights reserved.
CopyrightNotice=Copyright (c) 2024 Senseglove. All rights reserved.
[/Script/Engine.GameNetworkManager]
TotalNetBandwidth=64000
+1 -1
View File
@@ -1,5 +1,5 @@
[/Script/SenseGloveSettings.SGSettings]
TrackingSettings=(bFallbackToHandTrackingIfNoGloveDetected=False,GloveTrackingSettings=(GloveConnectivityCheckInterval=16.666666),HandTrackingSettings=(bUseMoreSpecificMotionSourceNames=False,bSupportLegacyControllerMotionSources=True),HMDTrackingSettings=(ViveHMDDetectionPriority=FocusVision_XRElite_Focus3),WristTrackingSettings=(OpenXRPositionalTrackingProvider=OpenXRViveTracker,TrackingHardware=ViveFocus3WristTracker,TrackingHardwareLocationOffsetLeftHand=(X=0.000000,Y=0.000000,Z=0.000000),TrackingHardwareLocationOffsetRightHand=(X=0.000000,Y=0.000000,Z=0.000000),TrackingHardwareRotationOffsetLeftHand=(Pitch=0.000000,Yaw=0.000000,Roll=0.000000),TrackingHardwareRotationOffsetRightHand=(Pitch=0.000000,Yaw=0.000000,Roll=0.000000),LeftHandMotionSource="LeftFoot",RightHandMotionSource="RightFoot",DebuggingSettings=(bDrawDebugWristTracker=False,DebugWristTrackerSettings=(Length=4.000000,XAxisColor=(B=0,G=0,R=255,A=255),YAxisColor=(B=0,G=255,R=0,A=255),ZAxisColor=(B=255,G=0,R=0,A=255),bPersistentLines=False,LifeTimeModifier=1.100000,DepthPriority=0,Thickness=0.400000))))
TrackingSettings=(bFallbackToHandTrackingIfNoGloveDetected=False,GloveTrackingSettings=(GloveConnectivityCheckInterval=16.666666),HandTrackingSettings=(bUseMoreSpecificMotionSourceNames=False,bSupportLegacyControllerMotionSources=True),HMDTrackingSettings=(ViveHMDDetectionPriority=FocusVision_XRElite_Focus3),WristTrackingSettings=(OpenXRPositionalTrackingProvider=OpenXR,TrackingHardware=Quest2Controller,TrackingHardwareLocationOffsetLeftHand=(X=0.000000,Y=0.000000,Z=0.000000),TrackingHardwareLocationOffsetRightHand=(X=0.000000,Y=0.000000,Z=0.000000),TrackingHardwareRotationOffsetLeftHand=(Pitch=0.000000,Yaw=0.000000,Roll=0.000000),TrackingHardwareRotationOffsetRightHand=(Pitch=0.000000,Yaw=0.000000,Roll=0.000000),LeftHandMotionSource="Left",RightHandMotionSource="Right",DebuggingSettings=(bDrawDebugWristTracker=False,DebugWristTrackerSettings=(Length=4.000000,XAxisColor=(B=0,G=0,R=255,A=255),YAxisColor=(B=0,G=255,R=0,A=255),ZAxisColor=(B=255,G=0,R=0,A=255),bPersistentLines=False,LifeTimeModifier=1.100000,DepthPriority=0,Thickness=0.400000))))
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -38,27 +38,14 @@ public:
void Initialize(USteamNotificationsSubsystem* MyParent)
{
ParentSubsystem = MyParent;
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
OnExternalUITriggeredCallback.Register(this, &USteamNotificationsSubsystem::cSteamEventsStore::OnExternalUITriggered);
#endif
}
void UnInitialize(USteamNotificationsSubsystem* MyParent)
{
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
OnExternalUITriggeredCallback.Unregister();
#endif
}
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
cSteamEventsStore()
{}
//:
/*OnExternalUITriggeredCallback(this, &cSteamEventsStore::OnExternalUITriggered)
cSteamEventsStore() :
OnExternalUITriggeredCallback(this, &cSteamEventsStore::OnExternalUITriggered)
{
}*/
}
#else
//cSteamEventsStore()
//{
@@ -70,8 +57,7 @@ public:
private:
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
//STEAM_CALLBACK(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback);
STEAM_CALLBACK_MANUAL(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback);
STEAM_CALLBACK(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback);
#endif
};
@@ -86,7 +72,7 @@ public:
/** Implement this for deinitialization of instances of the system */
virtual void Deinitialize() override
{
MyEvents.UnInitialize(this);
}
};
@@ -1,10 +1,6 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AdvancedSteamFriendsLibrary.h"
#include "OnlineSubSystemHeader.h"
#include "Engine/Texture.h"
#include "Engine/Texture2D.h"
#include "TextureResource.h"
#include "PixelFormat.h"
//General Log
DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog);
@@ -393,19 +393,22 @@ void UGripMotionControllerComponent::GetCurrentProfileTransform(bool bBindToNoti
FTransform NewControllerProfileTransform = FTransform::Identity;
/// 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
if (UEnum::GetDisplayValueAsText(HandType).ToString().Contains("Left")/*HandType == EControllerHand::Left*/ || HandType == EControllerHand::AnyHand || !VRSettings->bUseSeperateHandTransforms)
{
NewControllerProfileTransform = VRSettings->CurrentControllerProfileTransform;
FString message = FString::Printf(TEXT("Loaded left offsets! tracker source is %s "), *UEnum::GetDisplayValueAsText(HandType).ToString());
if (GEngine)
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, *message);
}
/// SENSEGLOVE PATCH - BEGIN
//else if (HandType == EControllerHand::Right)
else if (UEnum::GetDisplayValueAsText(HandType).ToString().Contains("Right"))
/// SENSEGLOVE PATCH - END
else if (UEnum::GetDisplayValueAsText(HandType).ToString().Contains("Right"))//HandType == EControllerHand::Right)
{
NewControllerProfileTransform = VRSettings->CurrentControllerProfileTransformRight;
FString message = FString::Printf(TEXT("Loaded right offsets! tracker source is %s "), *UEnum::GetDisplayValueAsText(HandType).ToString());
if (GEngine)
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, *message);
}
if (bBindToNoticationDelegate && !NewControllerProfileEvent_Handle.IsValid())
@@ -4316,7 +4319,7 @@ bool UGripMotionControllerComponent::TeleportMoveGrippedActor(AActor * GrippedAc
FBPActorGripInformation * GripInfo = LocallyGrippedObjects.FindByKey(GrippedActorToMove);
if (!GripInfo)
GripInfo = GrippedObjects.FindByKey(GrippedActorToMove);
GrippedObjects.FindByKey(GrippedActorToMove);
if (GripInfo)
{
@@ -4333,7 +4336,7 @@ bool UGripMotionControllerComponent::TeleportMoveGrippedComponent(UPrimitiveComp
FBPActorGripInformation * GripInfo = LocallyGrippedObjects.FindByKey(ComponentToMove);
if (!GripInfo)
GripInfo = GrippedObjects.FindByKey(ComponentToMove);
GrippedObjects.FindByKey(ComponentToMove);
if (GripInfo)
{
@@ -6023,7 +6026,7 @@ void UGripMotionControllerComponent::CleanUpBadPhysicsHandles()
{
FBPActorGripInformation * GripInfo = LocallyGrippedObjects.FindByKey(PhysicsGrips[g].GripID);
if(!GripInfo)
GripInfo = GrippedObjects.FindByKey(PhysicsGrips[g].GripID);
GrippedObjects.FindByKey(PhysicsGrips[g].GripID);
if (!GripInfo)
{
@@ -7230,15 +7233,8 @@ void UGripMotionControllerComponent::ApplyTrackingParameters(FVector& OriginalPo
if (IsValid(AttachChar) && !AttachChar->bRetainRoomscale)
{
if (AttachChar->VRMovementReference && AttachChar->VRMovementReference->GetReplicatedMovementMode() == EVRConjoinedMovementModes::C_VRMOVE_Seated)
{
}
else
{
FRotator StoredCameraRotOffset = UVRExpansionFunctionLibrary::GetHMDPureYaw_I(curRot.Rotator());
LastLocationForLateUpdate += StoredCameraRotOffset.RotateVector(FVector(AttachChar->VRRootReference->VRCapsuleOffset.X, AttachChar->VRRootReference->VRCapsuleOffset.Y, 0.0f));
}
FRotator StoredCameraRotOffset = UVRExpansionFunctionLibrary::GetHMDPureYaw_I(curRot.Rotator());
LastLocationForLateUpdate += StoredCameraRotOffset.RotateVector(FVector(AttachChar->VRRootReference->VRCapsuleOffset.X, AttachChar->VRRootReference->VRCapsuleOffset.Y, 0.0f));
}
}
}
@@ -7251,15 +7247,8 @@ void UGripMotionControllerComponent::ApplyTrackingParameters(FVector& OriginalPo
if (!AttachChar->bRetainRoomscale && IsLocallyControlled())
{
if (AttachChar->VRMovementReference && AttachChar->VRMovementReference->GetReplicatedMovementMode() == EVRConjoinedMovementModes::C_VRMOVE_Seated)
{
}
else
{
FRotator StoredCameraRotOffset = UVRExpansionFunctionLibrary::GetHMDPureYaw_I(AttachChar->VRReplicatedCamera->GetRelativeRotation());
LastLocationForLateUpdate += StoredCameraRotOffset.RotateVector(FVector(AttachChar->VRRootReference->VRCapsuleOffset.X, AttachChar->VRRootReference->VRCapsuleOffset.Y, 0.0f));
}
FRotator StoredCameraRotOffset = UVRExpansionFunctionLibrary::GetHMDPureYaw_I(AttachChar->VRReplicatedCamera->GetRelativeRotation());
LastLocationForLateUpdate += StoredCameraRotOffset.RotateVector(FVector(AttachChar->VRRootReference->VRCapsuleOffset.X, AttachChar->VRRootReference->VRCapsuleOffset.Y, 0.0f));
}
}
}
@@ -8354,18 +8343,12 @@ void UGripMotionControllerComponent::GetHandType(EControllerHand& Hand)
{
// Check if the palm motion source extension is being used
// I assume eventually epic will handle this case
/// 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;
}
// Could skip this and default to left now but would rather check
/// 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;
}
@@ -805,11 +805,11 @@ void AGrippableStaticMeshActor::OnRep_ReplicatedMovement()
return;
}
/*if (VRGripInterfaceSettings.HoldingControllers.Num() > 0)
if (VRGripInterfaceSettings.HoldingControllers.Num() > 0)
{
ShouldWeSkipAttachmentReplication();
int gg = 0;
}*/
}
Super::OnRep_ReplicatedMovement();
}
@@ -237,7 +237,7 @@ bool UHandSocketComponent::GetAnimationSequenceAsPoseSnapShot(UAnimSequence* InA
if (TrackIndex != INDEX_NONE && (!bSkipRootBone || TrackIndex != 0))
{
double TrackLocation = 0.0f;
double TrackLocation = 0.0f;
InAnimationSequence->GetBoneTransform(LocalTransform, FSkeletonPoseBoneIndex(TrackMap[TrackIndex].BoneTreeIndex), TrackLocation, false);
}
else
@@ -345,10 +345,7 @@ bool UHandSocketComponent::GetBlendedPoseSnapShot(FPoseSnapshot& PoseSnapShot, U
if (TrackIndex != INDEX_NONE && (!bSkipRootBone || TrackIndex != 0))
{
/// SENSEGLOVE PATCH - BEGIN
//double TrackLocation = 0.0f;
double TrackLocation = HandTargetAnimation->GetPlayLength() * HandAnimationProgress;
/// SENSEGLOVE PATCH - END
HandTargetAnimation->GetBoneTransform(LocalTransform, FSkeletonPoseBoneIndex(TrackMap[TrackIndex].BoneTreeIndex), TrackLocation, false);
}
else
@@ -210,7 +210,7 @@ void UReplicatedVRCameraComponent::UpdateTracking(float DeltaTime)
FRotator StoredCameraRotOffset = FRotator::ZeroRotator;
if (AttachChar->VRMovementReference && AttachChar->VRMovementReference->GetReplicatedMovementMode() == EVRConjoinedMovementModes::C_VRMOVE_Seated)
{
//StoredCameraRotOffset = AttachChar->SeatInformation.InitialRelCameraTransform.Rotator();
AttachChar->SeatInformation.InitialRelCameraTransform.Rotator();
}
else
{
@@ -250,7 +250,7 @@ void UReplicatedVRCameraComponent::RunNetworkedSmoothing(float DeltaTime)
FRotator StoredCameraRotOffset = FRotator::ZeroRotator;
if (AttachChar->VRMovementReference && AttachChar->VRMovementReference->GetReplicatedMovementMode() == EVRConjoinedMovementModes::C_VRMOVE_Seated)
{
//StoredCameraRotOffset = AttachChar->SeatInformation.InitialRelCameraTransform.Rotator();
AttachChar->SeatInformation.InitialRelCameraTransform.Rotator();
}
else
{
@@ -485,7 +485,7 @@ void UReplicatedVRCameraComponent::HandleXRCamera()
FRotator StoredCameraRotOffset = FRotator::ZeroRotator;
if (AttachChar->VRMovementReference->GetReplicatedMovementMode() == EVRConjoinedMovementModes::C_VRMOVE_Seated)
{
//StoredCameraRotOffset = AttachChar->SeatInformation.InitialRelCameraTransform.Rotator();
AttachChar->SeatInformation.InitialRelCameraTransform.Rotator();
}
else
{
@@ -536,7 +536,7 @@ void UReplicatedVRCameraComponent::OnRep_ReplicatedCameraTransform()
FRotator StoredCameraRotOffset = FRotator::ZeroRotator;
if (AttachChar->VRMovementReference && AttachChar->VRMovementReference->GetReplicatedMovementMode() == EVRConjoinedMovementModes::C_VRMOVE_Seated)
{
//StoredCameraRotOffset = AttachChar->SeatInformation.InitialRelCameraTransform.Rotator();
AttachChar->SeatInformation.InitialRelCameraTransform.Rotator();
}
else
{
@@ -340,11 +340,7 @@ void UVRCharacterMovementComponent::UnCrouch(bool bClientSimulation)
if (!bEncroached)
{
// Commit the change in location.
if (!BaseVRCharacterOwner || !BaseVRCharacterOwner->bRetainRoomscale)
{
// we actually move this when not using retained roomscale
//UpdatedComponent->MoveComponent(StandingLocation - PawnLocation, UpdatedComponent->GetComponentQuat(), false, nullptr, EMoveComponentFlags::MOVECOMP_NoFlags, ETeleportType::TeleportPhysics);
}
//UpdatedComponent->MoveComponent(StandingLocation - PawnLocation, UpdatedComponent->GetComponentQuat(), false, nullptr, EMoveComponentFlags::MOVECOMP_NoFlags, ETeleportType::TeleportPhysics);
bForceNextFloorCheck = true;
}
}
@@ -1553,7 +1553,7 @@ bool UVRRootComponent::IsLocallyControlled() const
// Simulated proxies should already have the new height from the server
if (!owningVRChar->bRetainRoomscale && (owningVRChar->GetNetMode() < ENetMode::NM_Client || IsLocallyControlled()))
{
MoveComponent(this->GetComponentQuat().GetUpVector() * (Offset * this->GetComponentScale().Z), GetComponentQuat(), false, nullptr, EMoveComponentFlags::MOVECOMP_NoFlags, ETeleportType::TeleportPhysics);
MoveComponent(this->GetComponentQuat().GetUpVector() * (Offset * this->GetComponentScale().Z), GetComponentQuat(), true, nullptr, EMoveComponentFlags::MOVECOMP_NoFlags, ETeleportType::TeleportPhysics);
}
/*else
{
@@ -415,8 +415,6 @@ UVRStereoWidgetComponent::~UVRStereoWidgetComponent()
void UVRStereoWidgetComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
Super::EndPlay(EndPlayReason);
if (EndPlayReason == EEndPlayReason::EndPlayInEditor || EndPlayReason == EEndPlayReason::Quit)
{
//FStereoLayerAdditionalFlagsManager::Destroy();
@@ -603,14 +601,7 @@ void UVRStereoWidgetComponent::TickComponent(float DeltaTime, enum ELevelTick Ti
if (AVRCharacter* VRChar = Cast<AVRCharacter>(mpawn))
{
if (VRChar->VRMovementReference && VRChar->VRMovementReference->GetReplicatedMovementMode() == EVRConjoinedMovementModes::C_VRMOVE_Seated)
{
}
else
{
HMDLoc += UVRExpansionFunctionLibrary::GetHMDPureYaw_I(HMDRot.Rotator()).RotateVector(FVector(VRChar->VRRootReference->VRCapsuleOffset.X, VRChar->VRRootReference->VRCapsuleOffset.Y, 0.0f));
}
HMDLoc += UVRExpansionFunctionLibrary::GetHMDPureYaw_I(HMDRot.Rotator()).RotateVector(FVector(VRChar->VRRootReference->VRCapsuleOffset.X, VRChar->VRRootReference->VRCapsuleOffset.Y, 0.0f));
}
DeltaTrans = FTransform(FQuat::Identity, HMDLoc, FVector(1.0f));
@@ -189,10 +189,8 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Animation")
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
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Socket Data|Mirroring")
+79 -3
View File
@@ -30,11 +30,87 @@ This demo is compatible with UE `5.4`.
To adjust the wrist-tracking settings for your specific hardware, please refer to the [official documentation](https://unreal.docs.senseglove.com/2.4/getting-started/setup-wrist-tracking-hardware/).
## How to checkout
## If the project crashes when deployed
Quest: N/A
Vive:
The most straightforward way to download this project is to click on the kebab menu (three vertical dots) located at the top-right of the screen and choose Download as Zip to obtain the source code for that branch or tag.
General Android: Make sure that bluetooth and location permissions have been given to the application
If it still crashes, you can comment out line 112 in the SGBackend.cpp
This repository is fully self-contained and ships a compatible version of the SenseGlove Unreal Engine Plugin with itself along with any third-party plugin that is required. So, once you download it using the kebab menu you can simply start using the project without the extra work of obtaining any plugins separately.
## How to change offsets
if you are using a device we support out of the box, you can change the offsets in BP_VRCharacter -> Controller profile and type in(or copy) the following text depending on your hardware:
"SG_HandTracking_Quest" for quest devices, both with Meta Quest Link and native on the quest
"SG_ViveWristTrackers" for using the vive wrist trackers on both desktop and native using the vive wrist trackers
## Changing tracking source
In BP_VRCharacter you can change hte tracking source for each hand, this is required based on the tracker you are using
## Callibration
in sensegloves/maps there is a callibration scene. there is also a "BP_callibrator" in the scene. Change the target map to the one you are using
## Adding more gestures
In the GraspingHandManny blueprint I have madce a simple function called "Save Hand Pose". If you press space bar while the game is running, it will save whatever pose the appropriate hand is placed at, and it is saved in a gestures data base, the one we are using can be found under Content/Senseglove with the name of "NewHnadPose", you should change the hand pose name to something else when you want to use it.
It is helpful to add an event dispatcher to the blueprint "GraspingHandManny" which gets called, in the event graph, from the "On New Gesture Detected" event from the OpenXRHandPose component. This is index based, rather than name based so keep that in mind when adding more dispatchers. by default we have examples for teleport, Grab, release and Use.
## VR Expansion changes
In VRExpansion plugin the following things have been changed:
### Blueprint Changes
#### BP_VRCharacter
4 functions added: SendVibration, SendFFB, SendSqueeze, ResetHaptics. These functions get the glove instance and then send the appropriate command to the glove.
in OnPossesed added "load controller by Name" and the string variable "trackingOffset" to load the correct offsets for the tracking
#### GraspingHandManny
in the function "Setup finger animations" you want to replace the bit where it checks handtype with Left, you want to check the enum as string and check if it contains "left" instead. This is to accomedate for different tracking sources like "left foot"
### C++ changes
#### Hand socket component:
You want to add the following lines as a public variable in the header file:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Animation")
float HandAnimationProgress = 0.0f;
in function "get blended pose snapshot" add change the line that says "double TrackLocation = 0.0f;" to " double TrackLocation = HandTargetAnimation->GetPlayLength() * HandAnimationProgress;"
#### In Motion Controller component:
change "if (HandType == EControllerHand::Left || HandType == EControllerHand::AnyHand || !VRSettings->bUseSeperateHandTransforms)" to "if (UEnum::GetDisplayValueAsText(HandType).ToString().Contains("Left")/*HandType == EControllerHand::Left*/ || HandType == EControllerHand::AnyHand || !VRSettings->bUseSeperateHandTransforms)"
and
change "else if (HandType == EControllerHand::Right)" to "else if (UEnum::GetDisplayValueAsText(HandType).ToString().Contains("Right"))//HandType == EControllerHand::Right)"
#### in Grip motion controller component
Change line 8346 to 8354 in the function "GetHandType(EControllerHand& Hand)" from
if (MotionSource.Compare(FName(TEXT("RightPalm"))) == 0 || MotionSource.Compare(FName(TEXT("RightWrist"))) == 0)
{
Hand = EControllerHand::Right;
}
// 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)
{
Hand = EControllerHand::Left;
}
to
if (MotionSource.Compare(FName(TEXT("RightPalm"))) == 0 || MotionSource.Compare(FName(TEXT("RightWrist"))) == 0 || MotionSource.ToString().Contains("Right"))
{
Hand = EControllerHand::Right;
}
// 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 || MotionSource.ToString().Contains("Left"))
{
Hand = EControllerHand::Left;
}
## License
+1 -1
View File
@@ -95,7 +95,7 @@
},
{
"Name": "OpenXRViveTracker",
"Enabled": true,
"Enabled": false,
"SupportedTargetPlatforms": [
"Win64",
"Linux",