* fix recenter behavior

* temp fix issues

* increment version to dev

* Fix autosave profile initialization, fix openxr movement up/down, allow using space fix in openxr state

* adjusted logging to reduce spam

* removed unused variable

* added delay to openxr space drag to improve performance and stop ovr api calls

* add logging for debugging issues

* improved log verbage

* fix wrong fn call error

* typemismatch error fix

* add default frame bindings

* openXR space drag skip frames increased 3->5, performance still not great

* remove chaperone universe checking completely, we shouldn't need any features

* fix compiler warnings

* update version string to rel

* fix chaperone moving on recenter, fix log spam

* increment version and back to dev

* clarify log

* change to release
This commit is contained in:
ykeara
2026-08-27 17:13:02 -05:00
committed by GitHub
parent 72e91e9116
commit 483a010fb8
8 changed files with 410 additions and 210 deletions
+1 -1
View File
@@ -1 +1 @@
5.8.11-release
5.8.13-release
+66 -29
View File
@@ -536,6 +536,31 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
}
LOG( WARNING ) << "Profile Not Found for Auto Apply Chaperone!";
}
auto indexList = ovr_system_wrapper::getAllConnectedDevices();
//Logging for troubleshooting
for (auto device : indexList)
{
auto info = ovr_system_wrapper::getInt32TrackedProperty(device, vr::Prop_ControllerRoleHint_Int32);
//auto error = info.first;
auto ctrlRole = info.second;
if ( vr::TrackedDeviceClass_HMD == ctrlRole )
{
LOG(INFO) << "HMD is: " << ovr_system_wrapper::getDeviceName(device);
continue;
}
if ( vr::TrackedControllerRole_LeftHand == ctrlRole )
{
LOG(INFO) << "Controller (L) is: " << ovr_system_wrapper::getDeviceName(device);
continue;
}
if ( vr::TrackedControllerRole_RightHand == ctrlRole )
{
LOG(INFO) << "Controller (R) is: " << ovr_system_wrapper::getDeviceName(device);
continue;
}
}
LOG(INFO)<< "Initilizaion is complete--------------------------------------------------";
}
void OverlayController::OnRenderRequest()
@@ -1102,7 +1127,7 @@ void OverlayController::mainEventLoop()
processInputBindings();
vr::VREvent_t vrEvent;
bool chaperoneDataAlreadyUpdated = false;
//bool chaperoneDataAlreadyUpdated = false;
while ( pollNextEvent( m_ulOverlayHandle, &vrEvent ) )
{
switch ( vrEvent.eventType )
@@ -1230,6 +1255,7 @@ void OverlayController::mainEventLoop()
}
break;
//TODO 8/6/2025, I don't this is necessary anymore, but marking until further testing
// Multiple ChaperoneUniverseHasChanged are often
// emitted at the same time (some with a little bit of
// delay) There is no sure way to recognize redundant
@@ -1237,30 +1263,33 @@ void OverlayController::mainEventLoop()
// the same call of OnTimeoutPumpEvents() INFO Removed
// logging on play space mover for possible crashing
// issues.
case vr::VREvent_ChaperoneUniverseHasChanged:
{
uint64_t previousUniverseId
= vrEvent.data.chaperone.m_nPreviousUniverse;
uint64_t currentUniverseId
= vrEvent.data.chaperone.m_nCurrentUniverse;
LOG( INFO )
<< "(VREvent) ChaperoneUniverseHasChanged... Previous : "
<< previousUniverseId << " Current:" << currentUniverseId;
if ( !chaperoneDataAlreadyUpdated )
{
m_chaperoneUtils.loadChaperoneData();
chaperoneDataAlreadyUpdated = true;
}
if ( previousUniverseId == 0
&& !m_moveCenterTabController.isInitComplete() )
{
m_moveCenterTabController.zeroOffsets();
}
}
// case vr::VREvent_ChaperoneUniverseHasChanged:
// {
// uint64_t previousUniverseId
// = vrEvent.data.chaperone.m_nPreviousUniverse;
// uint64_t currentUniverseId
// = vrEvent.data.chaperone.m_nCurrentUniverse;
// LOG( INFO )
// << "(VREvent) ChaperoneUniverseHasChanged... Previous : "
// << previousUniverseId << " Current:" << currentUniverseId;
// if ( !chaperoneDataAlreadyUpdated )
// {
// m_chaperoneUtils.loadChaperoneData();
// chaperoneDataAlreadyUpdated = true;
// }
// //TODO 8/3/2026 With newer steamvr Updates, this is not same reliable behavior.
// //Valve thought they saw issue, but Moving away from a potentially un-reliable metric is preffered
// //Additionally, some of the related effects are marked as deprected via openvr
// //It appears, as vavle would prefer to deprecate the whole stack or already has.
// // if ( previousUniverseId == 0
// // && !m_moveCenterTabController.isInitComplete() )
// // {
// // m_moveCenterTabController.zeroOffsets();
// // }
// }
break;
case vr::VREvent_Input_ActionManifestReloaded:
{
// LOG( WARNING ) << "Action Manifest Reloaded";
if ( m_steamVRTabController.perAppBindEnabled() )
{
m_steamVRTabController.applyAllCustomBindings();
@@ -1274,7 +1303,6 @@ void OverlayController::mainEventLoop()
if ( m_incomingReset )
{
m_incomingReset = false;
LOG( INFO ) << "Reset zero event recorded";
m_moveCenterTabController.incomingZeroReset();
}
@@ -1355,22 +1383,31 @@ void OverlayController::RotateUniverseCenter(
{
if ( yAngle != 0.0f )
{
if ( commit )
{
vr::VRChaperoneSetup()->HideWorkingSetPreview();
vr::VRChaperoneSetup()->RevertWorkingCopy();
}
// if ( commit )
// {
// vr::VRChaperoneSetup()->HideWorkingSetPreview();
// vr::VRChaperoneSetup()->RevertWorkingCopy();
// }
vr::HmdMatrix34_t curPos;
auto calState = vr::VRChaperone()->GetCalibrationState();
LOG( INFO ) << "Calibration State on Rotate is: " << calState;
if ( universe == vr::TrackingUniverseStanding )
{
vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose(
&curPos );
}
else
else if(universe == vr::TrackingUniverseSeated)
{
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
&curPos );
}
else
{
//TODO 8/3/26, will see if this causes issues
//should exclusively happen with openxr
LOG(INFO) << "rotating on undefined tracking universe probably openxr";
vr::VRChaperoneSetup()->GetLiveSeatedZeroPoseToRawTrackingPose(&curPos);
}
vr::HmdMatrix34_t rotMat;
vr::HmdMatrix34_t newPos;
+4
View File
@@ -23,6 +23,10 @@
{
"controller_type": "generic_hmd",
"binding_url": "default_action_manifests/ovras-team.advancedsettings_default_hmd.json"
},
{
"controller_type": "frame_controller",
"binding_url": "default_action_manifests/ovras-team.advancedsettings_default_frame.json"
}
],
@@ -0,0 +1,158 @@
{
"action_manifest_version" : 0,
"alias_info" : {},
"app_key" : "steam.overlay.1009850",
"bindings" : {
"/actions/haptic" : {
"haptics" : [
{
"output" : "/actions/haptic/out/hapticsleft",
"path" : "/user/hand/left/output/haptic"
},
{
"output" : "/actions/haptic/out/hapticsright",
"path" : "/user/hand/right/output/haptic"
}
],
"poses" : [],
"skeleton" : [],
"sources" : [
{
"inputs" : {},
"mode" : "none",
"parameters" : {},
"path" : "/user/hand/left/input/dpad_left"
},
{
"inputs" : {},
"mode" : "none",
"parameters" : {},
"path" : "/user/hand/left/input/dpad_right"
},
{
"inputs" : {},
"mode" : "none",
"parameters" : {},
"path" : "/user/hand/left/input/dpad_up"
},
{
"inputs" : {},
"mode" : "none",
"parameters" : {},
"path" : "/user/hand/right/input/b"
},
{
"inputs" : {},
"mode" : "none",
"parameters" : {},
"path" : "/user/hand/right/input/x"
},
{
"inputs" : {},
"mode" : "none",
"parameters" : {},
"path" : "/user/hand/right/input/y"
}
]
},
"/actions/motion" : {
"chords" : [
{
"inputs" : [
[ "/user/hand/left/input/dpad_down", "single" ],
[ "/user/hand/right/input/x", "touch" ],
[ "/user/hand/right/input/a", "touch" ]
],
"output" : "/actions/motion/in/resetoffsets"
}
],
"poses" : [],
"skeleton" : [],
"sources" : [
{
"inputs" : {
"click" : {
"output" : "/actions/motion/in/lefthandspaceturn"
}
},
"mode" : "button",
"parameters" : {},
"path" : "/user/hand/left/input/dpad_up"
},
{
"inputs" : {
"click" : {
"output" : "/actions/motion/in/optionaloverridelefthandspacedrag"
}
},
"mode" : "button",
"parameters" : {},
"path" : "/user/hand/left/input/dpad_up"
},
{
"inputs" : {
"click" : {
"output" : "/actions/motion/in/swapspacedragtolefthandoverride"
}
},
"mode" : "button",
"parameters" : {},
"path" : "/user/hand/left/input/dpad_up"
},
{
"inputs" : {
"click" : {
"output" : "/actions/motion/in/righthandspaceturn"
}
},
"mode" : "button",
"parameters" : {},
"path" : "/user/hand/right/input/y"
},
{
"inputs" : {
"click" : {
"output" : "/actions/motion/in/optionaloverriderighthandspacedrag"
}
},
"mode" : "button",
"parameters" : {},
"path" : "/user/hand/right/input/y"
},
{
"inputs" : {
"click" : {
"output" : "/actions/motion/in/swapspacedragtorighthandoverride"
}
},
"mode" : "button",
"parameters" : {},
"path" : "/user/hand/right/input/y"
}
]
},
"/actions/system" : {
"poses" : [],
"skeleton" : [],
"sources" : [
{
"inputs" : {
"click" : {
"output" : "/actions/system/in/pushtotalk"
}
},
"mode" : "button",
"parameters" : {},
"path" : "/user/hand/left/input/bumper"
}
]
}
},
"category" : "steamvr_input",
"controller_type" : "frame_controller",
"description" : "",
"interaction_profile" : "",
"name" : "OVRAS Frame Default",
"options" : {},
"simulated_actions" : []
}
+16 -16
View File
@@ -166,14 +166,14 @@ MyStackViewPage {
Connections {
target: MoveCenterTabController
onTrackingUniverseChanged: {
if (MoveCenterTabController.trackingUniverse === 0) {
fixButton.enabled = false
recenterButton.enabled = false
zeroSpaceButton.enabled = false
revertButton.enabled = false
undoFixButton.enabled = false
seatedWarningText.visible = true
} else if (MoveCenterTabController.trackingUniverse === 1) {
// if (MoveCenterTabController.trackingUniverse === 0) {
// fixButton.enabled = false
// recenterButton.enabled = false
// zeroSpaceButton.enabled = false
// revertButton.enabled = false
// undoFixButton.enabled = false
// seatedWarningText.visible = true
// } else if (MoveCenterTabController.trackingUniverse === 1) {
fixButton.enabled = true
recenterButton.enabled = true
zeroSpaceButton.enabled = true
@@ -181,14 +181,14 @@ MyStackViewPage {
// undoFixButton.enabled = true
// TODO Fix Undo Feature -^
seatedWarningText.visible = false
} else {
fixButton.enabled = false
recenterButton.enabled = false
zeroSpaceButton.enabled = false
revertButton.enabled = false
undoFixButton.enabled = false
seatedWarningText.visible = false
}
// } else {
// fixButton.enabled = false
// recenterButton.enabled = false
// zeroSpaceButton.enabled = false
// revertButton.enabled = false
// undoFixButton.enabled = false
// seatedWarningText.visible = false
// }
}
}
@@ -1499,6 +1499,7 @@ void ChaperoneTabController::createNewAutosaveProfile()
true,
true,
true );
LOG(INFO) <<"Chaperone Automatic Chaperone Profile Saved";
}
void ChaperoneTabController::applyAutosavedProfile()
+163 -164
View File
@@ -913,42 +913,30 @@ void MoveCenterTabController::incomingZeroReset()
// However It does appear to effect the recenter method (potentially other
// aspects) IN mixed tracking environments I get this issue, the check if
// there is an error and apply autosaved profile is hopefully a workaround
//This should catch OpenXR games, and helps prevent a loop on zero resets.
if(m_trackingUniverse==vr::TrackingUniverseRawAndUncalibrated){
return;
}
auto calState = vr::VRChaperone()->GetCalibrationState();
LOG( INFO ) << "Calibration State on Zero Reset is: " << calState;
LOG( INFO ) << "Calibration State on Recenter is: " << calState;
//Any Logging should be handled after openXR check to avoid spam;
// If we detect a seated Recenter and are not currently in process
// we reload chaperone from disk
if ( m_recenterStages < 1 )
{
LOG( INFO ) << "Re-Center Stage 1, reload from disk";
m_recenterStages++;
if ( calState > 199 && m_initComplete )
{
LOG( INFO ) << "Chaperone calibration state is error, attempting "
"to apply autosaved profile to fix issue";
parent->m_chaperoneTabController.applyAutosavedProfile();
}
// Revert Working copy to "apply" the changes
vr::VRChaperoneSetup()->RevertWorkingCopy();
// Send a Re-center again so the changes stick on our end.
sendSeatedRecenter();
return;
}
// We finalize the Recenter, by zero-ing offsets and setting new zero pos,
// and reseting our stage counter
if ( m_recenterStages == 1 )
{
LOG( INFO ) << "Recenter Stage 2 re-set zero pos, and reset offsets";
vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose(
&m_universeCenterForReset );
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
&m_seatedCenterForReset );
resetOffsets( true );
m_recenterStages = 0;
return;
}
//TODO 8/3/2026 SteamFrame May Need special handling, will discuss With Valve currently
//reset zero pose seems to move floor level as well as our changes, requiring 2 resets to set at correct level
//or we could potentially not apply our offset during this process
float offset[3] = { 0, 0, 0 };
offset[1] = -m_offsetY;
vr::VRChaperoneSetup()->RevertWorkingCopy();
vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose(
&m_universeCenterForReset );
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
&m_seatedCenterForReset );
addOffset(offset);
resetOffsets(true);
//reset();
return;
}
void MoveCenterTabController::reset()
@@ -1016,6 +1004,7 @@ void MoveCenterTabController::reset()
emit rotationChanged( m_rotation );
}
//TODO This needs to be renamed, it's mainly for initilization reasons
void MoveCenterTabController::zeroOffsets()
{
// first we'll check if we're outside the max commit distance
@@ -1112,43 +1101,42 @@ void MoveCenterTabController::zeroOffsets()
m_pendingZeroOffsets = false;
if ( !m_chaperoneBasisAcquired )
{
m_chaperoneBasisAcquired = true;
//TODO 8/3/2026, leaving this as is currently, Due to unreliable chaperone state information in current SteamVR versions
//this initilization can cause issues.
//m_initComplete = true;
//parent->m_chaperoneTabController.createNewAutosaveProfile();
if ( !m_initComplete )
{
setTrackingUniverse( vr::VRCompositor()->GetTrackingSpace() );
if ( parent->isPreviousShutdownSafe() )
{
//if ( parent->isPreviousShutdownSafe() )
//{
auto calState = vr::VRChaperone()->GetCalibrationState();
if ( calState == 200 )
{
LOG( WARNING )
<< "Chaperone State Does Not Exist Yet, will wait for "
"universe change to finish initialization";
}
else
if ( calState != 200 )
{
// all init complete, safe to autosave chaperone profile
parent->m_chaperoneTabController.createNewAutosaveProfile();
m_initComplete = true;
m_chaperoneBasisAcquired = true;
LOG( INFO ) << "Chaperone Initilization Complete, Space Drag Now Enabled";
}
}
else
{
// shutdown was unsafe last session!
LOG( WARNING ) << "DETECTED UNSAFE SHUTDOWN FROM LAST SESSION";
m_initComplete = false;
if ( !parent->crashRecoveryDisabled() )
{
parent->m_chaperoneTabController.applyAutosavedProfile();
LOG( INFO ) << "Applying last good chaperone "
"profile autosave";
}
}
// Now mark previous shutdown as unsafe in case we crash
// some time during this session. Previous shutdown will be
// marked as being safe once more just before our app shuts
// down properly.
parent->setPreviousShutdownSafe( false );
//}
// else
// {
// // shutdown was unsafe last session!
// LOG( WARNING ) << "DETECTED UNSAFE SHUTDOWN FROM LAST SESSION";
// m_initComplete = false;
// if ( !parent->crashRecoveryDisabled() )
// {
// parent->m_chaperoneTabController.applyAutosavedProfile();
// LOG( INFO ) << "Applying last good chaperone "
// "profile autosave";
// }
// }
// // Now mark previous shutdown as unsafe in case we crash
// // some time during this session. Previous shutdown will be
// // marked as being safe once more just before our app shuts
// // down properly.
// parent->setPreviousShutdownSafe( false );
}
m_pendingZeroOffsets = true;
}
@@ -1193,18 +1181,19 @@ void MoveCenterTabController::clampVelocity( double* velocity )
void MoveCenterTabController::updateChaperoneResetData()
{
auto cstate = vr::VRChaperone()->GetCalibrationState();
if ( cstate > 199 )
{
LOG( WARNING ) << "Chaperone Calibration State is error: " << cstate
<< " While Trying to Update Reset Data";
}
else
{
//auto cstate = vr::VRChaperone()->GetCalibrationState();
//TODO 8/3/26 calibration state is unreliable at best.
// if ( false)//cstate > 199 )
// {
// LOG( WARNING ) << "Chaperone Calibration State is error: " << cstate
// << " While Trying to Update Reset Data";
// }
// else
//{
vr::VRChaperoneSetup()->CommitWorkingCopy(
vr::EChaperoneConfigFile_Live );
vr::VRChaperoneSetup()->RevertWorkingCopy();
}
//}
unsigned currentQuadCount = 0;
vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr,
&currentQuadCount );
@@ -2719,6 +2708,19 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
vr::VRChaperoneSetup()->SetWorkingStandingZeroPoseToRawTrackingPose(
&offsetUniverseCenter );
//openxr
//In OpenXR titles commitworkingcopy essentially causes zero resets, this is too much work, and causes lag
//As such we will update every third frame for OpenXR titles, this should be reasonably responsive.
//We may have to re-visit or make user adjustable
if(m_trackingUniverse==vr::TrackingUniverseRawAndUncalibrated){
m_openXRSkip++;
if(m_openXRSkip % 5==0){
vr::VRChaperoneSetup()->CommitWorkingCopy(
vr::EChaperoneConfigFile_Live );
m_openXRSkip = 0;
}
}
//This is what actually throws you into the "working set" instead of live.
vr::VRChaperoneSetup()->ShowWorkingSetPreview();
if ( m_collisionBoundsCountForReset > 0 )
@@ -2757,7 +2759,6 @@ void MoveCenterTabController::eventLoopTick(
vr::VRChaperoneSetup()->RevertWorkingCopy();
}
setTrackingUniverse( int( universe ) );
// TODO set to allow.
return;
}
@@ -2789,102 +2790,100 @@ void MoveCenterTabController::eventLoopTick(
zeroOffsets();
// m_roomSetupModeDetected is set to false in zeroOffsets() if it's
// successful.
return;
}
setTrackingUniverse( int( universe ) );
// get current space rotation in radians
double angle = m_rotation * k_centidegreesToRadians;
// hmd rotations stats counting doesn't need to be smooth, so we
// skip some frames for performance
if ( m_hmdRotationStatsUpdateCounter >= k_hmdRotationCounterUpdateRate )
{
// device pose index 0 is always the hmd
updateHmdRotationCounter( devicePoses[0], angle );
m_hmdRotationStatsUpdateCounter = 0;
}
else
{
setTrackingUniverse( int( universe ) );
// get current space rotation in radians
double angle = m_rotation * k_centidegreesToRadians;
// hmd rotations stats counting doesn't need to be smooth, so we
// skip some frames for performance
if ( m_hmdRotationStatsUpdateCounter >= k_hmdRotationCounterUpdateRate )
{
// device pose index 0 is always the hmd
updateHmdRotationCounter( devicePoses[0], angle );
m_hmdRotationStatsUpdateCounter = 0;
}
else
{
m_hmdRotationStatsUpdateCounter++;
}
// only update dynamic motion if the dash is closed
if ( !parent->isDashboardVisible() )
{
// detect new dash closed
if ( m_dashWasOpenPreviousFrame )
{
// reset velocity time points on dash closed so we don't
// factor in the time motion was paused during the open dash
m_lastDragUpdateTimePoint = std::chrono::steady_clock::now();
m_lastGravityUpdateTimePoint = std::chrono::steady_clock::now();
}
// force chaperone bounds visible if turn or drag settings
// require
if ( dragBounds()
&& m_activeDragHand != vr::TrackedControllerRole_Invalid )
{
vr::VRChaperone()->ForceBoundsVisible( true );
}
else if ( turnBounds()
&& m_activeTurnHand != vr::TrackedControllerRole_Invalid )
{
vr::VRChaperone()->ForceBoundsVisible( true );
}
// only set back to default every frame if setting is enabled
else if ( turnBounds() || dragBounds() )
{
vr::VRChaperone()->ForceBoundsVisible(
parent->m_chaperoneTabController.forceBounds() );
}
// Smooth turn motion can cause sim-sickness so we check if the
// user wants to skip frames to reduce vection. We use the
// factor squared because of logarithmic human perception.
if ( m_turnComfortFrameSkipCounter >= static_cast<unsigned>(
( turnComfortFactor() * turnComfortFactor() ) ) )
{
updateHandTurn( devicePoses, angle );
m_turnComfortFrameSkipCounter = 0;
}
else
{
m_turnComfortFrameSkipCounter++;
}
// Smooth drag motion can cause sim-sickness so we check if the
// user wants to skip frames to reduce vection. We use the
// factor squared because of logarithmic human perception.
if ( m_dragComfortFrameSkipCounter >= static_cast<unsigned>(
( dragComfortFactor() * dragComfortFactor() ) ) )
{
updateHandDrag( devicePoses, angle );
m_lastDragUpdateTimePoint = std::chrono::steady_clock::now();
m_dragComfortFrameSkipCounter = 0;
}
else
{
m_dragComfortFrameSkipCounter++;
}
if ( m_gravityActive
&& m_activeDragHand == vr::TrackedControllerRole_Invalid )
{
updateGravity();
m_lastGravityUpdateTimePoint = std::chrono::steady_clock::now();
}
m_dashWasOpenPreviousFrame = false;
}
else
{
// dash is open this frame
m_dashWasOpenPreviousFrame = true;
}
updateSpace();
m_hmdRotationStatsUpdateCounter++;
}
// only update dynamic motion if the dash is closed
if ( !parent->isDashboardVisible() )
{
// detect new dash closed
if ( m_dashWasOpenPreviousFrame )
{
// reset velocity time points on dash closed so we don't
// factor in the time motion was paused during the open dash
m_lastDragUpdateTimePoint = std::chrono::steady_clock::now();
m_lastGravityUpdateTimePoint = std::chrono::steady_clock::now();
}
// force chaperone bounds visible if turn or drag settings
// require
if ( dragBounds()
&& m_activeDragHand != vr::TrackedControllerRole_Invalid )
{
vr::VRChaperone()->ForceBoundsVisible( true );
}
else if ( turnBounds()
&& m_activeTurnHand != vr::TrackedControllerRole_Invalid )
{
vr::VRChaperone()->ForceBoundsVisible( true );
}
// only set back to default every frame if setting is enabled
else if ( turnBounds() || dragBounds() )
{
vr::VRChaperone()->ForceBoundsVisible(
parent->m_chaperoneTabController.forceBounds() );
}
// Smooth turn motion can cause sim-sickness so we check if the
// user wants to skip frames to reduce vection. We use the
// factor squared because of logarithmic human perception.
if ( m_turnComfortFrameSkipCounter >= static_cast<unsigned>(
( turnComfortFactor() * turnComfortFactor() ) ) )
{
updateHandTurn( devicePoses, angle );
m_turnComfortFrameSkipCounter = 0;
}
else
{
m_turnComfortFrameSkipCounter++;
}
// Smooth drag motion can cause sim-sickness so we check if the
// user wants to skip frames to reduce vection. We use the
// factor squared because of logarithmic human perception.
if ( m_dragComfortFrameSkipCounter >= static_cast<unsigned>(
( dragComfortFactor() * dragComfortFactor() ) ) )
{
updateHandDrag( devicePoses, angle );
m_lastDragUpdateTimePoint = std::chrono::steady_clock::now();
m_dragComfortFrameSkipCounter = 0;
}
else
{
m_dragComfortFrameSkipCounter++;
}
if ( m_gravityActive
&& m_activeDragHand == vr::TrackedControllerRole_Invalid )
{
updateGravity();
m_lastGravityUpdateTimePoint = std::chrono::steady_clock::now();
}
m_dashWasOpenPreviousFrame = false;
}
else
{
// dash is open this frame
m_dashWasOpenPreviousFrame = true;
}
updateSpace();
}
} // namespace advsettings
@@ -197,6 +197,7 @@ private:
unsigned m_turnComfortFrameSkipCounter = 0;
int m_recenterStages = 0;
int m_chaperoneHasCommit = false;
int m_openXRSkip = 0;
// Matrix used For Center Marker
vr::HmdMatrix34_t m_offsetmatrix = utils::k_forwardUpMatrix;