Skip to content

Commit f095d2d

Browse files
ykearafeilen
andauthored
Chaperone Movement Fix 1.26.3 steamvr (#630)
* fix chaperone move behavior for 1.26.x of open/steamvr fix a ui error with a warning on old app and external chaperone --------- Co-authored-by: Chelsea Jaggi <feilen1000@gmail.com>
1 parent b3c3659 commit f095d2d

5 files changed

Lines changed: 48 additions & 25 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.7.1-release
1+
5.7.2-release

src/res/qml/SettingsPage.qml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ MyStackViewPage {
110110
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && checked
111111
}
112112
}
113+
RowLayout{
114+
115+
MyText {
116+
id: seatedOldExternalWarning
117+
wrapMode: Text.WordWrap
118+
font.pointSize: 20
119+
color: "#FFA500"
120+
text: "WARNING: 'Allow External App Chaperone Edits' + 'Old-Style Motion' + 'Enable Motion Features When in Seated Mode' active together may cause space center misalignment. Load the «Autosaved Profile» in the 'Chaperone' tab to fix."
121+
horizontalAlignment: Text.AlignHCenter
122+
Layout.leftMargin: 20
123+
Layout.rightMargin: 20
124+
Layout.preferredWidth: 900
125+
//Layout.fillWidth: true
126+
}
127+
}
113128

114129
MyToggleButton {
115130
id: universeCenteredRotationToggle
@@ -198,6 +213,13 @@ MyStackViewPage {
198213
OverlayController.setExclusiveInputEnabled(this.checked, true)
199214
}
200215
}
216+
MyToggleButton {
217+
id: spaceAdjustChaperoneToggle
218+
text: "Adjust Chaperone"
219+
onCheckedChanged: {
220+
MoveCenterTabController.adjustChaperone = this.checked
221+
}
222+
}
201223

202224
RowLayout {
203225
Layout.fillWidth: true
@@ -286,20 +308,6 @@ MyStackViewPage {
286308
Layout.fillWidth: true
287309
}
288310
}
289-
RowLayout{
290-
291-
MyText {
292-
id: seatedOldExternalWarning
293-
wrapMode: Text.WordWrap
294-
font.pointSize: 20
295-
color: "#FFA500"
296-
text: "WARNING: 'Allow External App Chaperone Edits' + 'Old-Style Motion' + 'Enable Motion Features When in Seated Mode' active together may cause space center misalignment. Load the «Autosaved Profile» in the 'Chaperone' tab to fix."
297-
horizontalAlignment: Text.AlignHCenter
298-
Layout.leftMargin: 20
299-
Layout.rightMargin: 20
300-
Layout.fillWidth: true
301-
}
302-
}
303311
RowLayout{
304312
Item {
305313
Layout.fillWidth: true
@@ -358,6 +366,7 @@ MyStackViewPage {
358366
oculusSdkToggleButton.checked = SettingsTabController.oculusSdkToggle
359367
exclusiveInputToggleButton.checked = OverlayController.exclusiveInputEnabled
360368
autoApplyChaperoneToggleButton.checked = OverlayController.autoApplyChaperoneEnabled
369+
spaceAdjustChaperoneToggle.checked = MoveCenterTabController.adjustChaperone
361370

362371

363372
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion
@@ -391,6 +400,9 @@ MyStackViewPage {
391400
onUniverseCenteredRotationChanged: {
392401
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
393402
}
403+
onAdjustChaperoneChanged:{
404+
spaceAdjustChaperoneToggle.checked = MoveCenterTabController.adjustChaperone
405+
}
394406
}
395407

396408
Connections {

src/settings/internal/settings_controller.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ class SettingsController
285285
SettingCategory::Playspace,
286286
QtInfo{ "enableUncalMotion" },
287287
false },
288+
BoolSettingValue{ BoolSetting::PLAYSPACE_adjustChaperone3,
289+
SettingCategory::Playspace,
290+
QtInfo{ "adjustChaperone3" },
291+
true },
288292

289293
BoolSettingValue{ BoolSetting::APPLICATION_disableVersionCheck,
290294
SettingCategory::Application,

src/settings/settings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ enum class BoolSetting
2424
PLAYSPACE_simpleRecenter,
2525
PLAYSPACE_adjustChaperone2,
2626
PLAYSPACE_enableUncalMotion,
27+
PLAYSPACE_adjustChaperone3,
2728

2829
APPLICATION_disableVersionCheck,
2930
APPLICATION_previousShutdownSafe,

src/tabcontrollers/MoveCenterTabController.cpp

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,12 @@ void MoveCenterTabController::setFrictionPercent( int value, bool notify )
457457
bool MoveCenterTabController::adjustChaperone() const
458458
{
459459
return settings::getSetting(
460-
settings::BoolSetting::PLAYSPACE_adjustChaperone2 );
460+
settings::BoolSetting::PLAYSPACE_adjustChaperone3 );
461461
}
462462

463463
void MoveCenterTabController::setAdjustChaperone( bool value, bool notify )
464464
{
465-
settings::setSetting( settings::BoolSetting::PLAYSPACE_adjustChaperone2,
465+
settings::setSetting( settings::BoolSetting::PLAYSPACE_adjustChaperone3,
466466
value );
467467

468468
if ( notify )
@@ -2767,9 +2767,14 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
27672767

27682768
// As of SVR 1.13.1 The Chaperone will follow Universe Center NOT raw
27692769
// Center as such this should be off by defualt.
2770+
// As of SVR 1.26.3 The chaperone seems to Have reverted back to pre 1.13.1
2771+
// behavior
2772+
// as of SVR 1.26.3 instead of 2x offset we have 1x offset and universe
2773+
// centerS
27702774

27712775
if ( adjustChaperone() )
27722776
{
2777+
// outputLogPoses();
27732778
// make a copy of our bounds and
27742779
// reorient relative to new universe center
27752780

@@ -2798,21 +2803,22 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
27982803
// original origin
27992804
updatedBounds[quad].vCorners[corner].v[0]
28002805
-= offsetUniverseCenter.m[0][3]
2801-
- offsetUniverseCenter.m[0][3];
2802-
//- m_universeCenterForReset.m[0][3];
2803-
// but don't touch y=0 values to keep floor corners rooted
2804-
// down
2806+
// - offsetUniverseCenter.m[0][3];
2807+
- m_universeCenterForReset.m[0][3];
2808+
// but don't touch y=0 values to keep floor corners
2809+
// rooted down
2810+
28052811
if ( updatedBounds[quad].vCorners[corner].v[1] != 0 )
28062812
{
28072813
updatedBounds[quad].vCorners[corner].v[1]
28082814
-= offsetUniverseCenter.m[1][3]
2809-
- offsetUniverseCenter.m[1][3];
2810-
//- m_universeCenterForReset.m[1][3];
2815+
//- offsetUniverseCenter.m[1][3];
2816+
- m_universeCenterForReset.m[1][3];
28112817
}
28122818
updatedBounds[quad].vCorners[corner].v[2]
28132819
-= offsetUniverseCenter.m[2][3]
2814-
- offsetUniverseCenter.m[2][3];
2815-
//- m_universeCenterForReset.m[2][3];
2820+
// - offsetUniverseCenter.m[2][3];
2821+
- m_universeCenterForReset.m[2][3];
28162822

28172823
// rotate by universe center's yaw
28182824
rotateFloatCoordinates(

0 commit comments

Comments
 (0)