Rework seated-universe motion
This commit is contained in:
@@ -94,6 +94,7 @@ MyStackViewPage {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: profileSection
|
||||
Layout.bottomMargin: 32
|
||||
spacing: 18
|
||||
RowLayout {
|
||||
@@ -504,7 +505,7 @@ MyStackViewPage {
|
||||
visible: false
|
||||
text: "Seated Recenter"
|
||||
onClicked: {
|
||||
MoveCenterTabController.updateSeatedResetData()
|
||||
MoveCenterTabController.sendSeatedRecenter()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,6 +533,7 @@ MyStackViewPage {
|
||||
offsetsGroupBox.visible = MoveCenterTabController.enableSeatedMotion
|
||||
rotationGroupBox.visible = MoveCenterTabController.enableSeatedMotion
|
||||
resetButtonRow.visible = MoveCenterTabController.enableSeatedMotion
|
||||
profileSection.visible = MoveCenterTabController.enableSeatedMotion
|
||||
seatedDisableWarningText.visible = !MoveCenterTabController.enableSeatedMotion
|
||||
|
||||
} else if (MoveCenterTabController.trackingUniverse === 1) {
|
||||
@@ -540,12 +542,14 @@ MyStackViewPage {
|
||||
offsetsGroupBox.visible = true
|
||||
rotationGroupBox.visible = true
|
||||
resetButtonRow.visible = true
|
||||
profileSection.visible = true
|
||||
seatedDisableWarningText.visible = false
|
||||
} else {
|
||||
spaceModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")"
|
||||
offsetsGroupBox.visible = false
|
||||
rotationGroupBox.visible = false
|
||||
resetButtonRow.visible = false
|
||||
profileSection.visible = false
|
||||
seatedDisableWarningText.visible = false
|
||||
}
|
||||
reloadOffsetProfiles()
|
||||
@@ -588,6 +592,7 @@ MyStackViewPage {
|
||||
offsetsGroupBox.visible = MoveCenterTabController.enableSeatedMotion
|
||||
rotationGroupBox.visible = MoveCenterTabController.enableSeatedMotion
|
||||
resetButtonRow.visible = MoveCenterTabController.enableSeatedMotion
|
||||
profileSection.visible = MoveCenterTabController.enableSeatedMotion
|
||||
seatedDisableWarningText.visible = !MoveCenterTabController.enableSeatedMotion
|
||||
}
|
||||
}
|
||||
@@ -598,6 +603,7 @@ MyStackViewPage {
|
||||
offsetsGroupBox.visible = MoveCenterTabController.enableSeatedMotion
|
||||
rotationGroupBox.visible = MoveCenterTabController.enableSeatedMotion
|
||||
resetButtonRow.visible = MoveCenterTabController.enableSeatedMotion
|
||||
profileSection.visible = MoveCenterTabController.enableSeatedMotion
|
||||
seatedDisableWarningText.visible = !MoveCenterTabController.enableSeatedMotion
|
||||
} else if (MoveCenterTabController.trackingUniverse === 1) {
|
||||
spaceModeText.text = "Standing"
|
||||
@@ -605,12 +611,14 @@ MyStackViewPage {
|
||||
offsetsGroupBox.visible = true
|
||||
rotationGroupBox.visible = true
|
||||
resetButtonRow.visible = true
|
||||
profileSection.visible = true
|
||||
seatedDisableWarningText.visible = false
|
||||
} else {
|
||||
spaceModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")"
|
||||
offsetsGroupBox.visible = false
|
||||
rotationGroupBox.visible = false
|
||||
resetButtonRow.visible = false
|
||||
profileSection.visible = false
|
||||
seatedDisableWarningText.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ MyStackViewPage {
|
||||
text: "Allow External App Chaperone Edits (Danger)"
|
||||
onCheckedChanged: {
|
||||
MoveCenterTabController.setAllowExternalEdits(checked, true)
|
||||
seatedOldExternalWarning.visible = checked && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +32,7 @@ MyStackViewPage {
|
||||
text: "Old-Style Motion (per-frame disk writes)"
|
||||
onCheckedChanged: {
|
||||
MoveCenterTabController.setOldStyleMotion(checked, true)
|
||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && checked && MoveCenterTabController.enableSeatedMotion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,28 +49,10 @@ MyStackViewPage {
|
||||
text: "Enable Motion Features When in Seated Mode (Experimental)"
|
||||
onCheckedChanged: {
|
||||
MoveCenterTabController.setEnableSeatedMotion(checked, true)
|
||||
seatedOffsetsRecenterRow.visible = checked
|
||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && checked
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
id: seatedOffsetsRecenterRow
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: 50
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: enableSeatedOffsetsRecenterToggle
|
||||
text: "Enable Auto-set Seated Offsets During Seated Recenter"
|
||||
onCheckedChanged: {
|
||||
MoveCenterTabController.setEnableSeatedOffsetsRecenter(checked, true)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: disableCrashRecoveryToggle
|
||||
text: "Disable Automatic Crash Recovery of Chaperone Config"
|
||||
@@ -165,6 +149,18 @@ MyStackViewPage {
|
||||
}
|
||||
}
|
||||
|
||||
MyText {
|
||||
id: seatedOldExternalWarning
|
||||
wrapMode: Text.WordWrap
|
||||
font.pointSize: 20
|
||||
color: "#FFA500"
|
||||
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."
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.leftMargin: 20
|
||||
Layout.rightMargin: 20
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
@@ -176,9 +172,7 @@ MyStackViewPage {
|
||||
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
|
||||
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
|
||||
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
|
||||
enableSeatedOffsetsRecenterToggle.checked = MoveCenterTabController.enableSeatedOffsetsRecenter
|
||||
enableSeatedMotionToggle.checked = MoveCenterTabController.enableSeatedMotion
|
||||
seatedOffsetsRecenterRow.visible = MoveCenterTabController.enableSeatedMotion
|
||||
|
||||
disableCrashRecoveryToggle.checked = OverlayController.crashRecoveryDisabled
|
||||
customTickRateText.text = OverlayController.customTickRateMs
|
||||
@@ -187,6 +181,9 @@ MyStackViewPage {
|
||||
customTickRateLabel.visible = vsyncDisabledToggle.checked
|
||||
customTickRateMsLabel.visible = vsyncDisabledToggle.checked
|
||||
debugStateRow.visible = OverlayController.enableDebug
|
||||
debugStateText.text = OverlayController.debugState
|
||||
|
||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
||||
}
|
||||
|
||||
Connections {
|
||||
@@ -200,19 +197,18 @@ MyStackViewPage {
|
||||
target: MoveCenterTabController
|
||||
onAllowExternalEditsChanged: {
|
||||
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
|
||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
||||
}
|
||||
onOldStyleMotionChanged: {
|
||||
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
|
||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
||||
}
|
||||
onUniverseCenteredRotationChanged: {
|
||||
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
|
||||
}
|
||||
onEnableSeatedOffsetsRecenterChanged: {
|
||||
enableSeatedOffsetsRecenterToggle.checked = MoveCenterTabController.enableSeatedOffsetsRecenter
|
||||
}
|
||||
onEnableSeatedMotionChanged: {
|
||||
enableSeatedMotionToggle.checked = MoveCenterTabController.enableSeatedMotion
|
||||
seatedOffsetsRecenterRow.visible = MoveCenterTabController.enableSeatedMotion
|
||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,6 +231,10 @@ MyStackViewPage {
|
||||
onEnableDebugChanged: {
|
||||
debugStateRow.visible = OverlayController.enableDebug
|
||||
}
|
||||
|
||||
onDebugStateChanged: {
|
||||
debugStateText.text = OverlayController.debugState
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,12 +153,6 @@ void MoveCenterTabController::initStage1()
|
||||
{
|
||||
m_universeCenteredRotation = value.toBool();
|
||||
}
|
||||
value = settings->value( "enableSeatedOffsetsRecenter",
|
||||
m_enableSeatedOffsetsRecenter );
|
||||
if ( value.isValid() && !value.isNull() )
|
||||
{
|
||||
m_enableSeatedOffsetsRecenter = value.toBool();
|
||||
}
|
||||
value = settings->value( "enableSeatedMotion", m_enableSeatedMotion );
|
||||
if ( value.isValid() && !value.isNull() )
|
||||
{
|
||||
@@ -353,10 +347,6 @@ void MoveCenterTabController::outputLogSettings()
|
||||
{
|
||||
LOG( INFO ) << "LOADED SETTINGS: Universe-Centered Rotation Enabled";
|
||||
}
|
||||
if ( m_enableSeatedOffsetsRecenter )
|
||||
{
|
||||
LOG( INFO ) << "LOADED SETTINGS: Seated Offsets Recenter Enabled";
|
||||
}
|
||||
if ( m_enableSeatedMotion )
|
||||
{
|
||||
LOG( INFO ) << "LOADED SETTINGS: Seated Motion Enabled";
|
||||
@@ -1191,30 +1181,6 @@ void MoveCenterTabController::setUniverseCenteredRotation( bool value,
|
||||
<< m_universeCenteredRotation;
|
||||
}
|
||||
|
||||
bool MoveCenterTabController::enableSeatedOffsetsRecenter() const
|
||||
{
|
||||
return m_enableSeatedOffsetsRecenter;
|
||||
}
|
||||
|
||||
void MoveCenterTabController::setEnableSeatedOffsetsRecenter( bool value,
|
||||
bool notify )
|
||||
{
|
||||
m_enableSeatedOffsetsRecenter = value;
|
||||
auto settings = OverlayController::appSettings();
|
||||
settings->beginGroup( "playspaceSettings" );
|
||||
settings->setValue( "enableSeatedOffsetsRecenter",
|
||||
m_enableSeatedOffsetsRecenter );
|
||||
settings->endGroup();
|
||||
settings->sync();
|
||||
if ( notify )
|
||||
{
|
||||
emit enableSeatedOffsetsRecenterChanged(
|
||||
m_enableSeatedOffsetsRecenter );
|
||||
}
|
||||
LOG( INFO ) << "CHANGED SETTINGS: Enable Seated Offsets Recenter Set: "
|
||||
<< m_enableSeatedOffsetsRecenter;
|
||||
}
|
||||
|
||||
bool MoveCenterTabController::isInitComplete() const
|
||||
{
|
||||
return m_initComplete;
|
||||
@@ -1285,11 +1251,6 @@ void MoveCenterTabController::shutdown()
|
||||
|
||||
void MoveCenterTabController::incomingSeatedReset()
|
||||
{
|
||||
if ( parent->enableDebug() && parent->debugState() == 2 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_enableSeatedMotion )
|
||||
{
|
||||
updateSeatedResetData();
|
||||
@@ -1304,6 +1265,12 @@ void MoveCenterTabController::reset()
|
||||
"basis is acquired!";
|
||||
return;
|
||||
}
|
||||
if ( m_pendingSeatedRecenter )
|
||||
{
|
||||
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
|
||||
&m_seatedCenterForReset );
|
||||
m_pendingSeatedRecenter = false;
|
||||
}
|
||||
vr::VRChaperoneSetup()->HideWorkingSetPreview();
|
||||
m_heightToggle = false;
|
||||
emit heightToggleChanged( m_heightToggle );
|
||||
@@ -1468,6 +1435,11 @@ void MoveCenterTabController::zeroOffsets()
|
||||
}
|
||||
}
|
||||
|
||||
void MoveCenterTabController::sendSeatedRecenter()
|
||||
{
|
||||
vr::VRSystem()->ResetSeatedZeroPose();
|
||||
}
|
||||
|
||||
double MoveCenterTabController::getHmdYawTotal()
|
||||
{
|
||||
return m_hmdYawTotal;
|
||||
@@ -1492,88 +1464,24 @@ void MoveCenterTabController::clampVelocity( double* velocity )
|
||||
|
||||
void MoveCenterTabController::updateSeatedResetData()
|
||||
{
|
||||
if ( !( parent->enableDebug() && parent->debugState() == 1 ) )
|
||||
{
|
||||
reset();
|
||||
}
|
||||
vr::VRChaperoneSetup()->RevertWorkingCopy();
|
||||
vr::TrackedDevicePose_t devicePosesStanding[vr::k_unMaxTrackedDeviceCount];
|
||||
vr::VRSystem()->GetDeviceToAbsoluteTrackingPose(
|
||||
vr::TrackingUniverseStanding,
|
||||
0.0f,
|
||||
devicePosesStanding,
|
||||
vr::k_unMaxTrackedDeviceCount );
|
||||
vr::HmdMatrix34_t hmdMatrix
|
||||
= devicePosesStanding[0].mDeviceToAbsoluteTracking;
|
||||
|
||||
vr::HmdQuaternion_t hmdQuat = quaternion::fromHmdMatrix34( hmdMatrix );
|
||||
double hmdYaw = quaternion::getYaw( hmdQuat );
|
||||
int hmdYawCentideg = static_cast<int>( hmdYaw * k_radiansToCentidegrees );
|
||||
// Keep angle within -18000 ~ 18000 centidegrees
|
||||
if ( hmdYawCentideg > 18000 )
|
||||
{
|
||||
hmdYawCentideg -= 36000;
|
||||
}
|
||||
else if ( hmdYawCentideg < -18000 )
|
||||
{
|
||||
hmdYawCentideg += 36000;
|
||||
}
|
||||
|
||||
m_seatedCenterForReset = m_universeCenterForReset;
|
||||
m_seatedHeight = hmdMatrix.m[1][3];
|
||||
m_seatedCenterForReset.m[1][3] += m_seatedHeight;
|
||||
|
||||
if ( m_enableSeatedOffsetsRecenter )
|
||||
{
|
||||
m_offsetX = hmdMatrix.m[0][3];
|
||||
m_offsetY = 0.0f;
|
||||
m_offsetZ = hmdMatrix.m[2][3];
|
||||
m_rotation = hmdYawCentideg;
|
||||
emit offsetXChanged( m_offsetX );
|
||||
emit offsetYChanged( m_offsetY );
|
||||
emit offsetZChanged( m_offsetZ );
|
||||
emit rotationChanged( m_rotation );
|
||||
}
|
||||
|
||||
if ( parent->enableDebug() )
|
||||
{
|
||||
switch ( parent->debugState() )
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose(
|
||||
&m_seatedCenterForReset );
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
|
||||
&m_seatedCenterForReset );
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
vr::VRChaperoneSetup()->GetLiveSeatedZeroPoseToRawTrackingPose(
|
||||
&m_seatedCenterForReset );
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
m_seatedCenterForReset
|
||||
= vr::VRSystem()
|
||||
->GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned checkQuadCount = 0;
|
||||
vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr,
|
||||
&checkQuadCount );
|
||||
if ( checkQuadCount > 0 )
|
||||
{
|
||||
parent->chaperoneUtils().loadChaperoneData( false );
|
||||
}
|
||||
m_heightToggle = false;
|
||||
emit heightToggleChanged( m_heightToggle );
|
||||
m_oldOffsetX = 0.0f;
|
||||
m_oldOffsetY = 0.0f;
|
||||
m_oldOffsetZ = 0.0f;
|
||||
m_oldRotation = 0;
|
||||
m_offsetX = 0.0f;
|
||||
m_offsetY = 0.0f;
|
||||
m_offsetZ = 0.0f;
|
||||
m_rotation = 0;
|
||||
emit offsetXChanged( m_offsetX );
|
||||
emit offsetYChanged( m_offsetY );
|
||||
emit offsetZChanged( m_offsetZ );
|
||||
emit rotationChanged( m_rotation );
|
||||
vr::VRChaperoneSetup()->ReloadFromDisk( vr::EChaperoneConfigFile_Live );
|
||||
// set pending update here, will be processed on next instance of motion or
|
||||
// running the reset() function.
|
||||
m_pendingSeatedRecenter = true;
|
||||
}
|
||||
|
||||
void MoveCenterTabController::updateChaperoneResetData()
|
||||
@@ -1590,19 +1498,8 @@ void MoveCenterTabController::updateChaperoneResetData()
|
||||
|
||||
vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose(
|
||||
&m_universeCenterForReset );
|
||||
|
||||
// update seated center to standing offset by current hmd Y value.
|
||||
m_seatedCenterForReset = m_universeCenterForReset;
|
||||
vr::TrackedDevicePose_t devicePosesStanding[vr::k_unMaxTrackedDeviceCount];
|
||||
vr::VRSystem()->GetDeviceToAbsoluteTrackingPose(
|
||||
vr::TrackingUniverseStanding,
|
||||
0.0f,
|
||||
devicePosesStanding,
|
||||
vr::k_unMaxTrackedDeviceCount );
|
||||
vr::HmdMatrix34_t hmdMatrix
|
||||
= devicePosesStanding[0].mDeviceToAbsoluteTracking;
|
||||
m_seatedHeight = hmdMatrix.m[1][3];
|
||||
m_seatedCenterForReset.m[1][3] += m_seatedHeight;
|
||||
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
|
||||
&m_seatedCenterForReset );
|
||||
|
||||
if ( m_collisionBoundsCountForReset > 0 )
|
||||
{
|
||||
@@ -2506,7 +2403,23 @@ void MoveCenterTabController::updateHandDrag(
|
||||
return;
|
||||
}
|
||||
|
||||
vr::TrackedDevicePose_t* movePose = devicePoses + moveHandId;
|
||||
vr::TrackedDevicePose_t* movePose;
|
||||
if ( m_seatedModeDetected )
|
||||
{
|
||||
vr::TrackedDevicePose_t
|
||||
seatedDevicePoses[vr::k_unMaxTrackedDeviceCount];
|
||||
vr::VRSystem()->GetDeviceToAbsoluteTrackingPose(
|
||||
vr::TrackingUniverseSeated,
|
||||
0.0f,
|
||||
seatedDevicePoses,
|
||||
vr::k_unMaxTrackedDeviceCount );
|
||||
movePose = seatedDevicePoses + moveHandId;
|
||||
}
|
||||
else
|
||||
{
|
||||
movePose = devicePoses + moveHandId;
|
||||
}
|
||||
|
||||
if ( !movePose->bPoseIsValid || !movePose->bDeviceIsConnected
|
||||
|| movePose->eTrackingResult != vr::TrackingResult_Running_OK )
|
||||
{
|
||||
@@ -2783,6 +2696,17 @@ void MoveCenterTabController::updateSpace()
|
||||
updateChaperoneResetData();
|
||||
}
|
||||
|
||||
// do a late on-demand setting of seated center basis when we need it for
|
||||
// motion. This gives the reload from disk a little more time to complete
|
||||
// before we apply the new seated basis.
|
||||
if ( m_pendingSeatedRecenter )
|
||||
{
|
||||
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
|
||||
&m_seatedCenterForReset );
|
||||
|
||||
m_pendingSeatedRecenter = false;
|
||||
}
|
||||
|
||||
vr::HmdMatrix34_t offsetUniverseCenter;
|
||||
|
||||
// set offsetUniverseCenter to the current angle
|
||||
@@ -2884,9 +2808,37 @@ void MoveCenterTabController::updateSpace()
|
||||
// keep the seated origin synced with offsets if in seated mode
|
||||
if ( m_trackingUniverse == vr::TrackingUniverseSeated )
|
||||
{
|
||||
vr::HmdMatrix34_t offsetSeatedCenter = offsetUniverseCenter;
|
||||
vr::HmdMatrix34_t offsetSeatedCenter;
|
||||
|
||||
offsetSeatedCenter.m[1][3] += m_seatedHeight;
|
||||
// set offsetSeatedCenter to the current angle
|
||||
utils::matMul33(
|
||||
offsetSeatedCenter, rotationMatrix, m_seatedCenterForReset );
|
||||
// fill in matrix coordinates for basis universe zero point
|
||||
offsetSeatedCenter.m[0][3] = m_seatedCenterForReset.m[0][3];
|
||||
offsetSeatedCenter.m[1][3] = m_seatedCenterForReset.m[1][3];
|
||||
offsetSeatedCenter.m[2][3] = m_seatedCenterForReset.m[2][3];
|
||||
|
||||
// move offsetSeatedCenter to the current offsets
|
||||
offsetSeatedCenter.m[0][3]
|
||||
+= m_seatedCenterForReset.m[0][0] * m_offsetX;
|
||||
offsetSeatedCenter.m[1][3]
|
||||
+= m_seatedCenterForReset.m[1][0] * m_offsetX;
|
||||
offsetSeatedCenter.m[2][3]
|
||||
+= m_seatedCenterForReset.m[2][0] * m_offsetX;
|
||||
|
||||
offsetSeatedCenter.m[0][3]
|
||||
+= m_seatedCenterForReset.m[0][1] * m_offsetY;
|
||||
offsetSeatedCenter.m[1][3]
|
||||
+= m_seatedCenterForReset.m[1][1] * m_offsetY;
|
||||
offsetSeatedCenter.m[2][3]
|
||||
+= m_seatedCenterForReset.m[2][1] * m_offsetY;
|
||||
|
||||
offsetSeatedCenter.m[0][3]
|
||||
+= m_seatedCenterForReset.m[0][2] * m_offsetZ;
|
||||
offsetSeatedCenter.m[1][3]
|
||||
+= m_seatedCenterForReset.m[1][2] * m_offsetZ;
|
||||
offsetSeatedCenter.m[2][3]
|
||||
+= m_seatedCenterForReset.m[2][2] * m_offsetZ;
|
||||
|
||||
vr::VRChaperoneSetup()->SetWorkingSeatedZeroPoseToRawTrackingPose(
|
||||
&offsetSeatedCenter );
|
||||
|
||||
@@ -98,10 +98,6 @@ class MoveCenterTabController : public QObject
|
||||
Q_PROPERTY(
|
||||
bool universeCenteredRotation READ universeCenteredRotation WRITE
|
||||
setUniverseCenteredRotation NOTIFY universeCenteredRotationChanged )
|
||||
Q_PROPERTY(
|
||||
bool enableSeatedOffsetsRecenter READ enableSeatedOffsetsRecenter WRITE
|
||||
setEnableSeatedOffsetsRecenter NOTIFY
|
||||
enableSeatedOffsetsRecenterChanged )
|
||||
Q_PROPERTY( bool enableSeatedMotion READ enableSeatedMotion WRITE
|
||||
setEnableSeatedMotion NOTIFY enableSeatedMotionChanged )
|
||||
|
||||
@@ -178,6 +174,7 @@ private:
|
||||
bool m_gravityReversed = false;
|
||||
bool m_chaperoneCommitted = true;
|
||||
bool m_pendingZeroOffsets = true;
|
||||
bool m_pendingSeatedRecenter = false;
|
||||
bool m_dashWasOpenPreviousFrame = false;
|
||||
bool m_roomSetupModeDetected = false;
|
||||
bool m_seatedModeDetected = false;
|
||||
@@ -185,7 +182,6 @@ private:
|
||||
bool m_allowExternalEdits = false;
|
||||
bool m_oldStyleMotion = false;
|
||||
bool m_universeCenteredRotation = false;
|
||||
bool m_enableSeatedOffsetsRecenter = false;
|
||||
bool m_enableSeatedMotion = false;
|
||||
unsigned settingsUpdateCounter = 0;
|
||||
int m_hmdRotationStatsUpdateCounter = 0;
|
||||
@@ -257,7 +253,6 @@ public:
|
||||
bool allowExternalEdits() const;
|
||||
bool oldStyleMotion() const;
|
||||
bool universeCenteredRotation() const;
|
||||
bool enableSeatedOffsetsRecenter() const;
|
||||
bool enableSeatedMotion() const;
|
||||
bool isInitComplete() const;
|
||||
double getHmdYawTotal();
|
||||
@@ -332,7 +327,6 @@ public slots:
|
||||
void setAllowExternalEdits( bool value, bool notify = true );
|
||||
void setOldStyleMotion( bool value, bool notify = true );
|
||||
void setUniverseCenteredRotation( bool value, bool notify = true );
|
||||
void setEnableSeatedOffsetsRecenter( bool value, bool notify = true );
|
||||
void setEnableSeatedMotion( bool value, bool notify = true );
|
||||
|
||||
void shutdown();
|
||||
@@ -340,6 +334,7 @@ public slots:
|
||||
void updateSeatedResetData();
|
||||
void outputLogPoses();
|
||||
void zeroOffsets();
|
||||
void sendSeatedRecenter();
|
||||
|
||||
void addOffsetProfile( QString name );
|
||||
void applyOffsetProfile( unsigned index );
|
||||
@@ -376,7 +371,6 @@ signals:
|
||||
void allowExternalEditsChanged( bool value );
|
||||
void oldStyleMotionChanged( bool value );
|
||||
void universeCenteredRotationChanged( bool value );
|
||||
void enableSeatedOffsetsRecenterChanged( bool value );
|
||||
void enableSeatedMotionChanged( bool value );
|
||||
|
||||
void offsetProfilesUpdated();
|
||||
|
||||
Reference in New Issue
Block a user