diff --git a/Handbook/src/appendix/changelog.md b/Handbook/src/appendix/changelog.md index 168187cb..0858bf0b 100644 --- a/Handbook/src/appendix/changelog.md +++ b/Handbook/src/appendix/changelog.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +This patch release addresses a few issues with both glove and hand-tracking. + +# Fixed + +- Fixed a chain of critical bugs that gets triggered due to `GloveConnectivityCheckInterval` getting passed as seconds to the engine rather than milliseconds. Thus, the default or any large value for `GloveConnectivityCheckInterval` causes noticeable long delays between glove-connectivity-check intervals and consequently renders the hand-tracking state invalid in certain situations when the `bFallbackToHandTrackingIfNoGloveDetected` option is false. + ## [2.2.1] - 2024-10-23 This patch release focuses exclusively on updates to the documentation. diff --git a/Source/SenseGloveSettings/Public/SGSettings/SGGloveTrackingSettings.h b/Source/SenseGloveSettings/Public/SGSettings/SGGloveTrackingSettings.h index 914b4d8d..a68d1dc9 100644 --- a/Source/SenseGloveSettings/Public/SGSettings/SGGloveTrackingSettings.h +++ b/Source/SenseGloveSettings/Public/SGSettings/SGGloveTrackingSettings.h @@ -51,7 +51,7 @@ struct SENSEGLOVESETTINGS_API FSGGloveTrackingSettings public: /** - * The interval in which the tracking module checks for glove connectivity. + * The interval in which the tracking module checks for glove connectivity (in milliseconds). * * The default is 16.666666f which means 60 times per second. */ diff --git a/Source/SenseGloveTracking/Private/SGTracking/SGGloveTracker.cpp b/Source/SenseGloveTracking/Private/SGTracking/SGGloveTracker.cpp index 421f8151..c32ca060 100644 --- a/Source/SenseGloveTracking/Private/SGTracking/SGGloveTracker.cpp +++ b/Source/SenseGloveTracking/Private/SGTracking/SGGloveTracker.cpp @@ -58,7 +58,7 @@ struct USGGloveTracker::FImpl { const USGSettings* Settings{USGSettings::GetInstance()}; ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); - return Settings->GetTrackingSettings().GloveTrackingSettings.GloveConnectivityCheckInterval; + return Settings->GetTrackingSettings().GloveTrackingSettings.GloveConnectivityCheckInterval * 0.001f; } /************************ @@ -137,7 +137,16 @@ void USGGloveTracker::Initialize(FSubsystemCollectionBase& Collection) Pimpl->GloveConnectivityCheckTimer, GloveConnectivityCheckHandler, GloveConnectivityCheckInterval, true, -1.0f); - SGLOG("The glove connectivity check timer has been started successfully!"); + if (ensureAlwaysMsgf(TimerManager.IsTimerActive(Pimpl->GloveConnectivityCheckTimer), + TEXT("GloveConnectivityCheckTimer is not active"))) + { + SGLOG("The glove connectivity check timer has been started successfully!"); + SGLOG("The glove connectivity timer interval is: ", GloveConnectivityCheckInterval); + } + else + { + SGLOG_ERROR("The glove connectivity check timer has failed to start!"); + } } SGLOG("The SenseGlove tracking singleton has been successfully initialized with the world lifetime!");