Terminolgy Change: "Playspace" -> "Room"

Valve's official terminology are "Room Setup" and "Tracking Universe". Changed our usage of "Playspace" to "Room" for clarity with the upcoming Room-Turn feature and existing Room-Drag feature when compared to nomenclature for other tools that exits out there.

Also slight clean up in readability of movecentertab's action functions.
This commit is contained in:
Kung-vr
2019-01-29 01:11:47 +09:00
parent a39196af01
commit 1d058dffcf
11 changed files with 472 additions and 612 deletions
+32 -33
View File
@@ -130,26 +130,25 @@ SteamIVRInput::SteamIVRInput()
m_pausePlayTrack( input_strings::k_actionPausePlayTrack, m_pausePlayTrack( input_strings::k_actionPausePlayTrack,
ActionType::Digital ), ActionType::Digital ),
m_stopTrack( input_strings::k_actionStopTrack, ActionType::Digital ), m_stopTrack( input_strings::k_actionStopTrack, ActionType::Digital ),
m_leftHandPlayspaceRotate( input_strings::k_actionLeftHandPlayspaceRotate, m_leftHandRoomTurn( input_strings::k_actionLeftHandRoomTurn,
ActionType::Digital ), ActionType::Digital ),
m_rightHandPlayspaceRotate( m_rightHandRoomTurn( input_strings::k_actionRightHandRoomTurn,
input_strings::k_actionRightHandPlayspaceRotate, ActionType::Digital ),
m_leftHandRoomDrag( input_strings::k_actionLeftHandRoomDrag,
ActionType::Digital ),
m_rightHandRoomDrag( input_strings::k_actionRightHandRoomDrag,
ActionType::Digital ),
m_optionalOverrideLeftHandRoomTurn(
input_strings::k_actionOptionalOverrideLeftHandRoomTurn,
ActionType::Digital ), ActionType::Digital ),
m_leftHandPlayspaceMove( input_strings::k_actionLeftHandPlayspaceMove, m_optionalOverrideRightHandRoomTurn(
ActionType::Digital ), input_strings::k_actionOptionalOverrideRightHandRoomTurn,
m_rightHandPlayspaceMove( input_strings::k_actionRightHandPlayspaceMove,
ActionType::Digital ),
m_optionalOverrideLeftHandPlayspaceRotate(
input_strings::k_actionOptionalOverrideLeftHandPlayspaceRotate,
ActionType::Digital ), ActionType::Digital ),
m_optionalOverrideRightHandPlayspaceRotate( m_optionalOverrideLeftHandRoomDrag(
input_strings::k_actionOptionalOverrideRightHandPlayspaceRotate, input_strings::k_actionOptionalOverrideLeftHandRoomDrag,
ActionType::Digital ), ActionType::Digital ),
m_optionalOverrideLeftHandPlayspaceMove( m_optionalOverrideRightHandRoomDrag(
input_strings::k_actionOptionalOverrideLeftHandPlayspaceMove, input_strings::k_actionOptionalOverrideRightHandRoomDrag,
ActionType::Digital ),
m_optionalOverrideRightHandPlayspaceMove(
input_strings::k_actionOptionalOverrideRightHandPlayspaceMove,
ActionType::Digital ) ActionType::Digital )
{ {
m_activeActionSet.ulActionSet = m_mainSet.handle(); m_activeActionSet.ulActionSet = m_mainSet.handle();
@@ -200,47 +199,47 @@ bool SteamIVRInput::stopSong()
return isDigitalActionActivatedOnce( m_stopTrack ); return isDigitalActionActivatedOnce( m_stopTrack );
} }
bool SteamIVRInput::leftHandPlayspaceRotate() bool SteamIVRInput::leftHandRoomTurn()
{ {
return isDigitalActionActivatedConstant( m_leftHandPlayspaceRotate ); return isDigitalActionActivatedConstant( m_leftHandRoomTurn );
} }
bool SteamIVRInput::rightHandPlayspaceRotate() bool SteamIVRInput::rightHandRoomTurn()
{ {
return isDigitalActionActivatedConstant( m_rightHandPlayspaceRotate ); return isDigitalActionActivatedConstant( m_rightHandRoomTurn );
} }
bool SteamIVRInput::leftHandPlayspaceMove() bool SteamIVRInput::leftHandRoomDrag()
{ {
return isDigitalActionActivatedConstant( m_leftHandPlayspaceMove ); return isDigitalActionActivatedConstant( m_leftHandRoomDrag );
} }
bool SteamIVRInput::rightHandPlayspaceMove() bool SteamIVRInput::rightHandRoomDrag()
{ {
return isDigitalActionActivatedConstant( m_rightHandPlayspaceMove ); return isDigitalActionActivatedConstant( m_rightHandRoomDrag );
} }
bool SteamIVRInput::optionalOverrideLeftHandPlayspaceRotate() bool SteamIVRInput::optionalOverrideLeftHandRoomTurn()
{ {
return isDigitalActionActivatedConstant( return isDigitalActionActivatedConstant(
m_optionalOverrideLeftHandPlayspaceRotate ); m_optionalOverrideLeftHandRoomTurn );
} }
bool SteamIVRInput::optionalOverrideRightHandPlayspaceRotate() bool SteamIVRInput::optionalOverrideRightHandRoomTurn()
{ {
return isDigitalActionActivatedConstant( return isDigitalActionActivatedConstant(
m_optionalOverrideRightHandPlayspaceRotate ); m_optionalOverrideRightHandRoomTurn );
} }
bool SteamIVRInput::optionalOverrideLeftHandPlayspaceMove() bool SteamIVRInput::optionalOverrideLeftHandRoomDrag()
{ {
return isDigitalActionActivatedConstant( return isDigitalActionActivatedConstant(
m_optionalOverrideLeftHandPlayspaceMove ); m_optionalOverrideLeftHandRoomDrag );
} }
bool SteamIVRInput::optionalOverrideRightHandPlayspaceMove() bool SteamIVRInput::optionalOverrideRightHandRoomDrag()
{ {
return isDigitalActionActivatedConstant( return isDigitalActionActivatedConstant(
m_optionalOverrideRightHandPlayspaceMove ); m_optionalOverrideRightHandRoomDrag );
} }
/*! /*!
+33 -33
View File
@@ -40,14 +40,14 @@ public:
bool previousSong(); bool previousSong();
bool pausePlaySong(); bool pausePlaySong();
bool stopSong(); bool stopSong();
bool leftHandPlayspaceRotate(); bool leftHandRoomTurn();
bool rightHandPlayspaceRotate(); bool rightHandRoomTurn();
bool leftHandPlayspaceMove(); bool leftHandRoomDrag();
bool rightHandPlayspaceMove(); bool rightHandRoomDrag();
bool optionalOverrideLeftHandPlayspaceRotate(); bool optionalOverrideLeftHandRoomTurn();
bool optionalOverrideRightHandPlayspaceRotate(); bool optionalOverrideRightHandRoomTurn();
bool optionalOverrideLeftHandPlayspaceMove(); bool optionalOverrideLeftHandRoomDrag();
bool optionalOverrideRightHandPlayspaceMove(); bool optionalOverrideRightHandRoomDrag();
// Destructor. There are no terminating calls for the IVRInput API, so it // Destructor. There are no terminating calls for the IVRInput API, so it
// is left blank. // is left blank.
@@ -78,15 +78,15 @@ private:
Action m_pausePlayTrack; Action m_pausePlayTrack;
Action m_stopTrack; Action m_stopTrack;
// Playspace bindings // Room bindings
Action m_leftHandPlayspaceRotate; Action m_leftHandRoomTurn;
Action m_rightHandPlayspaceRotate; Action m_rightHandRoomTurn;
Action m_leftHandPlayspaceMove; Action m_leftHandRoomDrag;
Action m_rightHandPlayspaceMove; Action m_rightHandRoomDrag;
Action m_optionalOverrideLeftHandPlayspaceRotate; Action m_optionalOverrideLeftHandRoomTurn;
Action m_optionalOverrideRightHandPlayspaceRotate; Action m_optionalOverrideRightHandRoomTurn;
Action m_optionalOverrideLeftHandPlayspaceMove; Action m_optionalOverrideLeftHandRoomDrag;
Action m_optionalOverrideRightHandPlayspaceMove; Action m_optionalOverrideRightHandRoomDrag;
}; };
/*! /*!
@@ -101,22 +101,22 @@ namespace input_strings
constexpr auto k_actionPausePlayTrack = "/actions/main/in/PausePlayTrack"; constexpr auto k_actionPausePlayTrack = "/actions/main/in/PausePlayTrack";
constexpr auto k_actionStopTrack = "/actions/main/in/StopTrack"; constexpr auto k_actionStopTrack = "/actions/main/in/StopTrack";
constexpr auto k_actionLeftHandPlayspaceRotate constexpr auto k_actionLeftHandRoomTurn
= "/actions/main/in/LeftHandPlayspaceRotate"; = "/actions/main/in/LeftHandRoomTurn";
constexpr auto k_actionRightHandPlayspaceRotate constexpr auto k_actionRightHandRoomTurn
= "/actions/main/in/RightHandPlayspaceRotate"; = "/actions/main/in/RightHandRoomTurn";
constexpr auto k_actionLeftHandPlayspaceMove constexpr auto k_actionLeftHandRoomDrag
= "/actions/main/in/LeftHandPlayspaceMove"; = "/actions/main/in/LeftHandRoomDrag";
constexpr auto k_actionRightHandPlayspaceMove constexpr auto k_actionRightHandRoomDrag
= "/actions/main/in/RightHandPlayspaceMove"; = "/actions/main/in/RightHandRoomDrag";
constexpr auto k_actionOptionalOverrideLeftHandPlayspaceRotate constexpr auto k_actionOptionalOverrideLeftHandRoomTurn
= "/actions/main/in/OptionalOverrideLeftHandPlayspaceRotate"; = "/actions/main/in/OptionalOverrideLeftHandRoomTurn";
constexpr auto k_actionOptionalOverrideRightHandPlayspaceRotate constexpr auto k_actionOptionalOverrideRightHandRoomTurn
= "/actions/main/in/OptionalOverrideRightHandPlayspaceRotate"; = "/actions/main/in/OptionalOverrideRightHandRoomTurn";
constexpr auto k_actionOptionalOverrideLeftHandPlayspaceMove constexpr auto k_actionOptionalOverrideLeftHandRoomDrag
= "/actions/main/in/OptionalOverrideLeftHandPlayspaceMove"; = "/actions/main/in/OptionalOverrideLeftHandRoomDrag";
constexpr auto k_actionOptionalOverrideRightHandPlayspaceMove constexpr auto k_actionOptionalOverrideRightHandRoomDrag
= "/actions/main/in/OptionalOverrideRightHandPlayspaceMove"; = "/actions/main/in/OptionalOverrideRightHandRoomDrag";
constexpr auto k_setMain = "/actions/main"; constexpr auto k_setMain = "/actions/main";
+14 -16
View File
@@ -503,24 +503,22 @@ void OverlayController::processInputBindings()
// reorder these. Override actions must always come after normal because // reorder these. Override actions must always come after normal because
// active priority is set based on which action is "newest" // active priority is set based on which action is "newest"
// normal actions: // normal actions:
m_moveCenterTabController.leftHandPlayspaceMove( m_moveCenterTabController.leftHandRoomDrag( m_actions.leftHandRoomDrag() );
m_actions.leftHandPlayspaceMove() ); m_moveCenterTabController.rightHandRoomDrag(
m_moveCenterTabController.rightHandPlayspaceMove( m_actions.rightHandRoomDrag() );
m_actions.rightHandPlayspaceMove() ); m_moveCenterTabController.leftHandRoomTurn( m_actions.leftHandRoomTurn() );
m_moveCenterTabController.leftHandPlayspaceRotate( m_moveCenterTabController.rightHandRoomTurn(
m_actions.leftHandPlayspaceRotate() ); m_actions.rightHandRoomTurn() );
m_moveCenterTabController.rightHandPlayspaceRotate(
m_actions.rightHandPlayspaceRotate() );
// override actions: // override actions:
m_moveCenterTabController.optionalOverrideLeftHandPlayspaceMove( m_moveCenterTabController.optionalOverrideLeftHandRoomDrag(
m_actions.optionalOverrideLeftHandPlayspaceMove() ); m_actions.optionalOverrideLeftHandRoomDrag() );
m_moveCenterTabController.optionalOverrideRightHandPlayspaceMove( m_moveCenterTabController.optionalOverrideRightHandRoomDrag(
m_actions.optionalOverrideRightHandPlayspaceMove() ); m_actions.optionalOverrideRightHandRoomDrag() );
m_moveCenterTabController.optionalOverrideLeftHandPlayspaceRotate( m_moveCenterTabController.optionalOverrideLeftHandRoomTurn(
m_actions.optionalOverrideLeftHandPlayspaceRotate() ); m_actions.optionalOverrideLeftHandRoomTurn() );
m_moveCenterTabController.optionalOverrideRightHandPlayspaceRotate( m_moveCenterTabController.optionalOverrideRightHandRoomTurn(
m_actions.optionalOverrideRightHandPlayspaceRotate() ); m_actions.optionalOverrideRightHandRoomTurn() );
} }
// vsync implementation: // vsync implementation:
+33 -33
View File
@@ -27,42 +27,42 @@
"type": "boolean" "type": "boolean"
}, },
{ {
"name": "/actions/main/in/LeftHandPlayspaceRotate", "name": "/actions/main/in/LeftHandRoomTurn",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/RightHandPlayspaceRotate",
"requirement": "optional", "requirement": "optional",
"type": "boolean" "type": "boolean"
}, },
{ {
"name": "/actions/main/in/LeftHandPlayspaceMove", "name": "/actions/main/in/RightHandRoomTurn",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/RightHandPlayspaceMove",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/OptionalOverrideLeftHandPlayspaceRotate",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/OptionalOverrideRightHandPlayspaceRotate",
"requirement": "optional", "requirement": "optional",
"type": "boolean" "type": "boolean"
}, },
{ {
"name": "/actions/main/in/OptionalOverrideLeftHandPlayspaceMove", "name": "/actions/main/in/LeftHandRoomDrag",
"requirement": "optional", "requirement": "optional",
"type": "boolean" "type": "boolean"
}, },
{ {
"name": "/actions/main/in/OptionalOverrideRightHandPlayspaceMove", "name": "/actions/main/in/RightHandRoomDrag",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/OptionalOverrideLeftHandRoomTurn",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/OptionalOverrideRightHandRoomTurn",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/OptionalOverrideLeftHandRoomDrag",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/main/in/OptionalOverrideRightHandRoomDrag",
"requirement": "optional", "requirement": "optional",
"type": "boolean" "type": "boolean"
} }
@@ -83,14 +83,14 @@
"/actions/main/in/PreviousTrack" : "Play Previous Track", "/actions/main/in/PreviousTrack" : "Play Previous Track",
"/actions/main/in/PausePlayTrack" : "Pause/Play Track", "/actions/main/in/PausePlayTrack" : "Pause/Play Track",
"/actions/main/in/StopTrack" : "Stop Track", "/actions/main/in/StopTrack" : "Stop Track",
"/actions/main/in/LeftHandPlayspaceRotate" : "Left Hand Playspace Rotate", "/actions/main/in/LeftHandRoomTurn" : "Left Hand Room Turn",
"/actions/main/in/RightHandPlayspaceRotate" : "Right Hand Playspace Rotate", "/actions/main/in/RightHandRoomTurn" : "Right Hand Room Turn",
"/actions/main/in/LeftHandPlayspaceMove" : "Left Hand Playspace Move", "/actions/main/in/LeftHandRoomDrag" : "Left Hand Room Drag",
"/actions/main/in/RightHandPlayspaceMove" : "Right Hand Playspace Move", "/actions/main/in/RightHandRoomDrag" : "Right Hand Room Drag",
"/actions/main/in/OptionalOverrideLeftHandPlayspaceRotate" : "Optional Override Left Hand Playspace Rotate", "/actions/main/in/OptionalOverrideLeftHandRoomTurn" : "Optional Override Left Hand Room Turn",
"/actions/main/in/OptionalOverrideRightHandPlayspaceRotate" : "Optional Override Right Hand Playspace Rotate", "/actions/main/in/OptionalOverrideRightHandRoomTurn" : "Optional Override Right Hand Room Turn",
"/actions/main/in/OptionalOverrideLeftHandPlayspaceMove" : "Optional Override Left Hand Playspace Move", "/actions/main/in/OptionalOverrideLeftHandRoomDrag" : "Optional Override Left Hand Room Drag",
"/actions/main/in/OptionalOverrideRightHandPlayspaceMove" : "Optional Override Right Hand Playspace Move" "/actions/main/in/OptionalOverrideRightHandRoomDrag" : "Optional Override Right Hand Room Drag"
} }
] ]
} }
+4 -4
View File
@@ -6,7 +6,7 @@ import matzman666.advsettings 1.0
MyStackViewPage { MyStackViewPage {
headerText: "Playspace Fix" headerText: "Room Fix"
content: ColumnLayout { content: ColumnLayout {
spacing: 18 spacing: 18
@@ -57,7 +57,7 @@ MyStackViewPage {
MyPushButton { MyPushButton {
id: recenterButton id: recenterButton
Layout.fillWidth: true Layout.fillWidth: true
text: "Recenter Playspace" text: "Recenter Room"
Layout.preferredHeight: 100 Layout.preferredHeight: 100
onClicked: { onClicked: {
FixFloorTabController.recenterClicked() FixFloorTabController.recenterClicked()
@@ -75,9 +75,9 @@ MyStackViewPage {
} }
MyPushButton { MyPushButton {
id: zeroPlayspaceButton id: zeroRoomButton
Layout.fillWidth: true Layout.fillWidth: true
text: "Zero Playspace Tab Offsets" text: "Apply Room Settings Offsets as Center"
Layout.preferredHeight: 100 Layout.preferredHeight: 100
onClicked: { onClicked: {
MoveCenterTabController.zeroOffsets() MoveCenterTabController.zeroOffsets()
+62 -74
View File
@@ -6,7 +6,7 @@ import matzman666.advsettings 1.0
MyStackViewPage { MyStackViewPage {
headerText: "Play Space Settings" headerText: "Room Settings"
content: ColumnLayout { content: ColumnLayout {
spacing: 18 spacing: 18
@@ -17,7 +17,7 @@ MyStackViewPage {
Layout.preferredWidth: 230 Layout.preferredWidth: 230
} }
MyText { MyText {
id: playspaceModeText id: roomModeText
font.bold: true font.bold: true
text: "Standing" text: "Standing"
} }
@@ -28,7 +28,7 @@ MyStackViewPage {
label: MyText { label: MyText {
leftPadding: 10 leftPadding: 10
text: "Move Play Space" text: "Move Room"
bottomPadding: -10 bottomPadding: -10
} }
background: Rectangle { background: Rectangle {
@@ -60,7 +60,7 @@ MyStackViewPage {
} }
MyPushButton2 { MyPushButton2 {
id: playSpaceMoveXMinusButton id: roomMoveXMinusButton
Layout.preferredWidth: 40 Layout.preferredWidth: 40
text: "-" text: "-"
onClicked: { onClicked: {
@@ -69,7 +69,7 @@ MyStackViewPage {
} }
MyTextField { MyTextField {
id: playSpaceMoveXText id: roomMoveXText
text: "0.00" text: "0.00"
keyBoardUID: 101 keyBoardUID: 101
Layout.preferredWidth: 140 Layout.preferredWidth: 140
@@ -88,7 +88,7 @@ MyStackViewPage {
} }
MyPushButton2 { MyPushButton2 {
id: playSpaceMoveXPlusButton id: roomMoveXPlusButton
Layout.preferredWidth: 40 Layout.preferredWidth: 40
text: "+" text: "+"
onClicked: { onClicked: {
@@ -126,7 +126,7 @@ MyStackViewPage {
} }
MyTextField { MyTextField {
id: playSpaceMoveYText id: roomMoveYText
text: "0.00" text: "0.00"
keyBoardUID: 102 keyBoardUID: 102
Layout.preferredWidth: 140 Layout.preferredWidth: 140
@@ -180,7 +180,7 @@ MyStackViewPage {
} }
MyTextField { MyTextField {
id: playSpaceMoveZText id: roomMoveZText
text: "0.00" text: "0.00"
keyBoardUID: 103 keyBoardUID: 103
Layout.preferredWidth: 140 Layout.preferredWidth: 140
@@ -223,7 +223,7 @@ MyStackViewPage {
label: MyText { label: MyText {
leftPadding: 10 leftPadding: 10
text: "Rotate Play Space" text: "Rotate Room"
bottomPadding: -10 bottomPadding: -10
} }
background: Rectangle { background: Rectangle {
@@ -245,7 +245,7 @@ MyStackViewPage {
ColumnLayout { ColumnLayout {
RowLayout { RowLayout {
MyPushButton2 { MyPushButton2 {
id: playSpaceRotationMinusButton id: roomRotationMinusButton
Layout.preferredWidth: 40 Layout.preferredWidth: 40
text: "-" text: "-"
onClicked: { onClicked: {
@@ -258,7 +258,7 @@ MyStackViewPage {
} }
MySlider { MySlider {
id: playspaceRotationSlider id: roomRotationSlider
from: -180 from: -180
to: 180 to: 180
stepSize: 0.01 stepSize: 0.01
@@ -269,13 +269,13 @@ MyStackViewPage {
MoveCenterTabController.tempRotation = Math.round(val * 100) MoveCenterTabController.tempRotation = Math.round(val * 100)
} }
onValueChanged: { onValueChanged: {
MoveCenterTabController.tempRotation = Math.round(playspaceRotationSlider.value * 100) MoveCenterTabController.tempRotation = Math.round(roomRotationSlider.value * 100)
//playspaceRotationText.text = Math.round(playspaceRotationSlider.value) + "°" //roomRotationText.text = Math.round(roomRotationSlider.value) + "°"
} }
} }
MyPushButton2 { MyPushButton2 {
id: playSpaceRotationPlusButton id: roomRotationPlusButton
Layout.preferredWidth: 40 Layout.preferredWidth: 40
text: "+" text: "+"
onClicked: { onClicked: {
@@ -288,7 +288,7 @@ MyStackViewPage {
} }
MyTextField { MyTextField {
id: playspaceRotationText id: roomRotationText
text: "0°" text: "0°"
keyBoardUID: 104 keyBoardUID: 104
Layout.preferredWidth: 150 Layout.preferredWidth: 150
@@ -306,7 +306,7 @@ MyStackViewPage {
} }
} }
MyPushButton { MyPushButton {
id: playSpaceRotationApplyButton id: roomRotationApplyButton
Layout.preferredWidth: 145 Layout.preferredWidth: 145
text:"Apply" text:"Apply"
onClicked: { onClicked: {
@@ -316,15 +316,15 @@ MyStackViewPage {
} }
MyToggleButton { MyToggleButton {
id: playspaceRotateHandToggle id: roomRotateHandToggle
text: "Virtual Move Shortcut Controls Rotation" text: "Enable Room-Turn Binding"
onCheckedChanged: { onCheckedChanged: {
MoveCenterTabController.rotateHand = this.checked MoveCenterTabController.rotateHand = this.checked
} }
} }
MyText { MyText {
text: "Note: TurnSignal will ignore turning during virtual move rotation." text: "Note: TurnSignal will ignore turning during Room-Turn rotation."
font.pointSize: 15.0 font.pointSize: 15.0
} }
} }
@@ -336,7 +336,7 @@ MyStackViewPage {
label: MyText { label: MyText {
leftPadding: 10 leftPadding: 10
text: "Virtual Move Shortcut" text: "Room Drag Binding"
bottomPadding: -10 bottomPadding: -10
} }
background: Rectangle { background: Rectangle {
@@ -346,11 +346,11 @@ MyStackViewPage {
} }
ColumnLayout { ColumnLayout {
RowLayout { RowLayout {
anchors.fill: parent Layout.fillWidth: true
MyToggleButton { MyToggleButton {
id: moveShortcutLeft id: moveShortcutLeft
text: "Left Menu Button" text: "Enable Left Hand"
onCheckedChanged: { onCheckedChanged: {
MoveCenterTabController.moveShortcutLeft = this.checked MoveCenterTabController.moveShortcutLeft = this.checked
} }
@@ -358,29 +358,21 @@ MyStackViewPage {
MyToggleButton { MyToggleButton {
id: moveShortcutRight id: moveShortcutRight
text: "Right Menu Button" text: "Enable Right Hand"
onCheckedChanged: { onCheckedChanged: {
MoveCenterTabController.moveShortcutRight = this.checked MoveCenterTabController.moveShortcutRight = this.checked
} }
} }
MyToggleButton {
id: requireDoubleClick
text: "Require double click"
onCheckedChanged: {
MoveCenterTabController.requireDoubleClick = this.checked
}
}
} }
} }
} }
ColumnLayout { ColumnLayout {
RowLayout { RowLayout {
anchors.fill: parent Layout.fillWidth: true
MyPushButton { MyPushButton {
id: playspaceResetButton id: roomResetButton
Layout.preferredWidth: 250 Layout.preferredWidth: 250
text: "Reset" text: "Reset"
onClicked: { onClicked: {
@@ -389,7 +381,7 @@ MyStackViewPage {
} }
MyToggleButton { MyToggleButton {
id: playspaceAdjustChaperoneToggle id: roomAdjustChaperoneToggle
text: "Adjust Chaperone" text: "Adjust Chaperone"
onCheckedChanged: { onCheckedChanged: {
MoveCenterTabController.adjustChaperone = this.checked MoveCenterTabController.adjustChaperone = this.checked
@@ -404,68 +396,64 @@ MyStackViewPage {
Item { Layout.fillHeight: true; Layout.fillWidth: true} Item { Layout.fillHeight: true; Layout.fillWidth: true}
Component.onCompleted: { Component.onCompleted: {
playspaceAdjustChaperoneToggle.checked = MoveCenterTabController.adjustChaperone roomAdjustChaperoneToggle.checked = MoveCenterTabController.adjustChaperone
playspaceRotateHandToggle.checked = MoveCenterTabController.rotateHand roomRotateHandToggle.checked = MoveCenterTabController.rotateHand
playSpaceMoveXText.text = MoveCenterTabController.offsetX.toFixed(2) roomMoveXText.text = MoveCenterTabController.offsetX.toFixed(2)
playSpaceMoveYText.text = MoveCenterTabController.offsetY.toFixed(2) roomMoveYText.text = MoveCenterTabController.offsetY.toFixed(2)
playSpaceMoveZText.text = MoveCenterTabController.offsetZ.toFixed(2) roomMoveZText.text = MoveCenterTabController.offsetZ.toFixed(2)
playspaceRotationSlider.value = MoveCenterTabController.rotation roomRotationSlider.value = MoveCenterTabController.rotation
moveShortcutRight.checked = MoveCenterTabController.moveShortcutRight moveShortcutRight.checked = MoveCenterTabController.moveShortcutRight
moveShortcutLeft.checked = MoveCenterTabController.moveShortcutLeft moveShortcutLeft.checked = MoveCenterTabController.moveShortcutLeft
lockXToggle.checked = MoveCenterTabController.lockXToggle lockXToggle.checked = MoveCenterTabController.lockXToggle
lockYToggle.checked = MoveCenterTabController.lockYToggle lockYToggle.checked = MoveCenterTabController.lockYToggle
lockZToggle.checked = MoveCenterTabController.lockZToggle lockZToggle.checked = MoveCenterTabController.lockZToggle
requireDoubleClick.checked = MoveCenterTabController.requireDoubleClick
if (MoveCenterTabController.trackingUniverse === 0) { if (MoveCenterTabController.trackingUniverse === 0) {
playspaceModeText.text = "Sitting" roomModeText.text = "Sitting"
playSpaceRotationPlusButton.enabled = false roomRotationPlusButton.enabled = false
playSpaceRotationMinusButton.enabled = false roomRotationMinusButton.enabled = false
playspaceRotationSlider.enabled = false roomRotationSlider.enabled = false
playspaceRotationText.text = "-" roomRotationText.text = "-"
} else if (MoveCenterTabController.trackingUniverse === 1) { } else if (MoveCenterTabController.trackingUniverse === 1) {
playspaceModeText.text = "Standing" roomModeText.text = "Standing"
playSpaceRotationPlusButton.enabled = true roomRotationPlusButton.enabled = true
playSpaceRotationMinusButton.enabled = true roomRotationMinusButton.enabled = true
playspaceRotationSlider.enabled = true roomRotationSlider.enabled = true
playspaceRotationText.text = "0°" roomRotationText.text = "0°"
} else { } else {
playspaceModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")" roomModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")"
} }
} }
Connections { Connections {
target: MoveCenterTabController target: MoveCenterTabController
onOffsetXChanged: { onOffsetXChanged: {
playSpaceMoveXText.text = MoveCenterTabController.offsetX.toFixed(2) roomMoveXText.text = MoveCenterTabController.offsetX.toFixed(2)
} }
onOffsetYChanged: { onOffsetYChanged: {
playSpaceMoveYText.text = MoveCenterTabController.offsetY.toFixed(2) roomMoveYText.text = MoveCenterTabController.offsetY.toFixed(2)
} }
onOffsetZChanged: { onOffsetZChanged: {
playSpaceMoveZText.text = MoveCenterTabController.offsetZ.toFixed(2) roomMoveZText.text = MoveCenterTabController.offsetZ.toFixed(2)
} }
onRotationChanged: { onRotationChanged: {
playspaceRotationSlider.value = ( MoveCenterTabController.rotation / 100 ) roomRotationSlider.value = ( MoveCenterTabController.rotation / 100 )
} }
onTempRotationChanged: { onTempRotationChanged: {
playspaceRotationSlider.value = ( MoveCenterTabController.tempRotation / 100 ) roomRotationSlider.value = ( MoveCenterTabController.tempRotation / 100 )
playspaceRotationText.text = ( MoveCenterTabController.tempRotation / 100 ) + "°" roomRotationText.text = ( MoveCenterTabController.tempRotation / 100 ) + "°"
} }
onAdjustChaperoneChanged: { onAdjustChaperoneChanged: {
playspaceAdjustChaperoneToggle.checked = MoveCenterTabController.adjustChaperone roomAdjustChaperoneToggle.checked = MoveCenterTabController.adjustChaperone
} }
onRotateHandChanged: { onRotateHandChanged: {
playspaceRotateHandToggle.checked = MoveCenterTabController.rotateHand roomRotateHandToggle.checked = MoveCenterTabController.rotateHand
} }
onMoveShortcutRightChanged: { onMoveShortcutRightChanged: {
moveShortcutRight.checked = MoveCenterTabController.moveShortcutRight moveShortcutRight.checked = MoveCenterTabController.moveShortcutRight
} }
onMoveShortcutLeftChanged: { onMoveShortcutLeftChanged: {
moveShortcutLeft.checked = MoveCenterTabController.moveShortcutLeft moveShortcutLeft.checked = MoveCenterTabController.moveShortcutLeft
}
onRequireDoubleClickChanged: {
requireDoubleClick.checked = MoveCenterTabController.requireDoubleClick
} }
onLockXToggleChanged: { onLockXToggleChanged: {
lockXToggle.checked = MoveCenterTabController.lockXToggle lockXToggle.checked = MoveCenterTabController.lockXToggle
@@ -478,19 +466,19 @@ MyStackViewPage {
} }
onTrackingUniverseChanged: { onTrackingUniverseChanged: {
if (MoveCenterTabController.trackingUniverse === 0) { if (MoveCenterTabController.trackingUniverse === 0) {
playspaceModeText.text = "Sitting" roomModeText.text = "Sitting"
playSpaceRotationPlusButton.enabled = false roomRotationPlusButton.enabled = false
playSpaceRotationMinusButton.enabled = false roomRotationMinusButton.enabled = false
playspaceRotationSlider.enabled = false roomRotationSlider.enabled = false
playspaceRotationText.text = "-" roomRotationText.text = "-"
} else if (MoveCenterTabController.trackingUniverse === 1) { } else if (MoveCenterTabController.trackingUniverse === 1) {
playspaceModeText.text = "Standing" roomModeText.text = "Standing"
playSpaceRotationPlusButton.enabled = true roomRotationPlusButton.enabled = true
playSpaceRotationMinusButton.enabled = true roomRotationMinusButton.enabled = true
playspaceRotationSlider.enabled = true roomRotationSlider.enabled = true
playspaceRotationText.text = "0°" roomRotationText.text = "0°"
} else { } else {
playspaceModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")" roomModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")"
} }
} }
} }
+2 -2
View File
@@ -48,7 +48,7 @@ MyStackViewPage {
MyPushButton { MyPushButton {
id: playSpaceButton id: playSpaceButton
activationSoundEnabled: false activationSoundEnabled: false
text: "Play Space" text: "Room Settings"
Layout.fillWidth: true Layout.fillWidth: true
onClicked: { onClicked: {
MyResources.playFocusChangedSound() MyResources.playFocusChangedSound()
@@ -59,7 +59,7 @@ MyStackViewPage {
MyPushButton { MyPushButton {
id: fixFloorButton id: fixFloorButton
activationSoundEnabled: false activationSoundEnabled: false
text: "Playspace Fix" text: "Room Fix"
Layout.fillWidth: true Layout.fillWidth: true
onClicked: { onClicked: {
MyResources.playFocusChangedSound() MyResources.playFocusChangedSound()
+1 -1
View File
@@ -145,7 +145,7 @@ void FixFloorTabController::eventLoopTick(
floorOffsetZ = tempOffsetZ; floorOffsetZ = tempOffsetZ;
LOG( INFO ) LOG( INFO )
<< "Fix Floor and adjust playspace center: Floor Offset = [" << "Fix Floor and adjust room center: Floor Offset = ["
<< floorOffsetX << ", " << floorOffsetY << ", " << floorOffsetX << ", " << floorOffsetY << ", "
<< floorOffsetZ << "]"; << floorOffsetZ << "]";
float offset[3] = { 0, 0, 0 }; float offset[3] = { 0, 0, 0 };
+268 -382
View File
@@ -34,25 +34,22 @@ void MoveCenterTabController::initStage1()
{ {
m_adjustChaperone = value.toBool(); m_adjustChaperone = value.toBool();
} }
value = settings->value( "rotateHand", m_rotateHand ); value = settings->value( "rotateHand", m_settingsHandTurningEnabled );
if ( value.isValid() && !value.isNull() ) if ( value.isValid() && !value.isNull() )
{ {
m_rotateHand = value.toBool(); m_settingsHandTurningEnabled = value.toBool();
} }
value = settings->value( "moveShortcutRight", m_moveShortcutRightEnabled ); value = settings->value( "moveShortcutRight",
m_settingsRightHandDragEnabled );
if ( value.isValid() && !value.isNull() ) if ( value.isValid() && !value.isNull() )
{ {
m_moveShortcutRightEnabled = value.toBool(); m_settingsRightHandDragEnabled = value.toBool();
} }
value = settings->value( "moveShortcutLeft", m_moveShortcutLeftEnabled ); value
= settings->value( "moveShortcutLeft", m_settingsLeftHandDragEnabled );
if ( value.isValid() && !value.isNull() ) if ( value.isValid() && !value.isNull() )
{ {
m_moveShortcutLeftEnabled = value.toBool(); m_settingsLeftHandDragEnabled = value.toBool();
}
value = settings->value( "requireDoubleClick", m_requireDoubleClick );
if ( value.isValid() && !value.isNull() )
{
m_requireDoubleClick = value.toBool();
} }
value = settings->value( "lockXToggle", m_lockXToggle ); value = settings->value( "lockXToggle", m_lockXToggle );
if ( value.isValid() && !value.isNull() ) if ( value.isValid() && !value.isNull() )
@@ -292,77 +289,58 @@ void MoveCenterTabController::setAdjustChaperone( bool value, bool notify )
bool MoveCenterTabController::rotateHand() const bool MoveCenterTabController::rotateHand() const
{ {
return m_rotateHand; return m_settingsHandTurningEnabled;
} }
void MoveCenterTabController::setRotateHand( bool value, bool notify ) void MoveCenterTabController::setRotateHand( bool value, bool notify )
{ {
m_rotateHand = value; m_settingsHandTurningEnabled = value;
auto settings = OverlayController::appSettings(); auto settings = OverlayController::appSettings();
settings->beginGroup( "playspaceSettings" ); settings->beginGroup( "playspaceSettings" );
settings->setValue( "rotateHand", m_rotateHand ); settings->setValue( "rotateHand", m_settingsHandTurningEnabled );
settings->endGroup(); settings->endGroup();
settings->sync(); settings->sync();
if ( notify ) if ( notify )
{ {
emit rotateHandChanged( m_rotateHand ); emit rotateHandChanged( m_settingsHandTurningEnabled );
} }
} }
bool MoveCenterTabController::moveShortcutRight() const bool MoveCenterTabController::moveShortcutRight() const
{ {
return m_moveShortcutRightEnabled; return m_settingsRightHandDragEnabled;
} }
void MoveCenterTabController::setMoveShortcutRight( bool value, bool notify ) void MoveCenterTabController::setMoveShortcutRight( bool value, bool notify )
{ {
m_moveShortcutRightEnabled = value; m_settingsRightHandDragEnabled = value;
auto settings = OverlayController::appSettings(); auto settings = OverlayController::appSettings();
settings->beginGroup( "playspaceSettings" ); settings->beginGroup( "playspaceSettings" );
settings->setValue( "moveShortcutRight", m_moveShortcutRightEnabled ); settings->setValue( "moveShortcutRight", m_settingsRightHandDragEnabled );
settings->endGroup(); settings->endGroup();
settings->sync(); settings->sync();
if ( notify ) if ( notify )
{ {
emit moveShortcutRightChanged( m_moveShortcutRightEnabled ); emit moveShortcutRightChanged( m_settingsRightHandDragEnabled );
} }
} }
bool MoveCenterTabController::moveShortcutLeft() const bool MoveCenterTabController::moveShortcutLeft() const
{ {
return m_moveShortcutLeftEnabled; return m_settingsLeftHandDragEnabled;
} }
void MoveCenterTabController::setMoveShortcutLeft( bool value, bool notify ) void MoveCenterTabController::setMoveShortcutLeft( bool value, bool notify )
{ {
m_moveShortcutLeftEnabled = value; m_settingsLeftHandDragEnabled = value;
auto settings = OverlayController::appSettings(); auto settings = OverlayController::appSettings();
settings->beginGroup( "playspaceSettings" ); settings->beginGroup( "playspaceSettings" );
settings->setValue( "moveShortcutLeft", m_moveShortcutLeftEnabled ); settings->setValue( "moveShortcutLeft", m_settingsLeftHandDragEnabled );
settings->endGroup(); settings->endGroup();
settings->sync(); settings->sync();
if ( notify ) if ( notify )
{ {
emit moveShortcutLeftChanged( m_moveShortcutLeftEnabled ); emit moveShortcutLeftChanged( m_settingsLeftHandDragEnabled );
}
}
bool MoveCenterTabController::requireDoubleClick() const
{
return m_requireDoubleClick;
}
void MoveCenterTabController::setRequireDoubleClick( bool value, bool notify )
{
m_requireDoubleClick = value;
auto settings = OverlayController::appSettings();
settings->beginGroup( "playspaceSettings" );
settings->setValue( "requireDoubleClick", m_requireDoubleClick );
settings->endGroup();
settings->sync();
if ( notify )
{
emit requireDoubleClickChanged( m_requireDoubleClick );
} }
} }
@@ -532,445 +510,353 @@ void MoveCenterTabController::resetHmdYawTotal()
m_hmdYawTotal = 0.0; m_hmdYawTotal = 0.0;
} }
// START of move bindings: // START of drag bindings:
void MoveCenterTabController::leftHandPlayspaceMove( bool leftHandMoveActive ) void MoveCenterTabController::leftHandRoomDrag( bool leftHandDragActive )
{ {
if ( m_moveShortcutLeftEnabled ) if ( !m_settingsLeftHandDragEnabled )
{ {
// cancel if other hand is active in override return;
if ( !m_overrideRightHandMovePressed )
{
// detect new press
if ( leftHandMoveActive && !m_leftHandMovePressed )
{
m_activeMoveHand = vr::TrackedControllerRole_LeftHand;
}
// detect new release
else if ( !leftHandMoveActive && m_leftHandMovePressed )
{
// check overrides
// pass back to right hand?
if ( m_overrideRightHandMovePressed )
{
m_activeMoveHand = vr::TrackedControllerRole_RightHand;
}
// override of left hand still active?
else if ( m_overrideLeftHandMovePressed )
{
m_activeMoveHand = vr::TrackedControllerRole_LeftHand;
}
// check non-override right hand action
if ( m_rightHandMovePressed )
{
m_activeMoveHand = vr::TrackedControllerRole_RightHand;
}
// nothing else is pressed, deactivate move
else
{
m_activeMoveHand = vr::TrackedControllerRole_Invalid;
}
}
}
m_leftHandMovePressed = leftHandMoveActive;
} }
} // cancel if other hand is active in override
if ( !m_overrideRightHandDragPressed )
void MoveCenterTabController::rightHandPlayspaceMove( bool rightHandMoveActive )
{
if ( m_moveShortcutRightEnabled )
{
// cancel if other hand is active in override
if ( !m_overrideLeftHandMovePressed )
{
// detect new press
if ( rightHandMoveActive && !m_rightHandMovePressed )
{
m_activeMoveHand = vr::TrackedControllerRole_RightHand;
}
// detect new release
else if ( !rightHandMoveActive && m_rightHandMovePressed )
{
// check overrides
// pass back to left hand?
if ( m_overrideLeftHandMovePressed )
{
m_activeMoveHand = vr::TrackedControllerRole_LeftHand;
}
// override of right hand still active?
else if ( m_overrideRightHandMovePressed )
{
m_activeMoveHand = vr::TrackedControllerRole_RightHand;
}
// check non-override left hand action
if ( m_leftHandMovePressed )
{
m_activeMoveHand = vr::TrackedControllerRole_LeftHand;
}
// nothing else is pressed, deactivate move
else
{
m_activeMoveHand = vr::TrackedControllerRole_Invalid;
}
}
}
m_rightHandMovePressed = rightHandMoveActive;
}
}
void MoveCenterTabController::optionalOverrideLeftHandPlayspaceMove(
bool overrideLeftHandMoveActive )
{
if ( m_moveShortcutLeftEnabled )
{ {
// detect new press // detect new press
if ( overrideLeftHandMoveActive && !m_overrideLeftHandMovePressed ) if ( leftHandDragActive && !m_leftHandDragPressed )
{ {
m_activeMoveHand = vr::TrackedControllerRole_LeftHand; m_activeDragHand = vr::TrackedControllerRole_LeftHand;
// stop any active rotate because we're in override mode
m_activeRotateHand = vr::TrackedControllerRole_Invalid;
} }
// detect new release // detect new release
else if ( !overrideLeftHandMoveActive && m_overrideLeftHandMovePressed ) else if ( !leftHandDragActive && m_leftHandDragPressed )
{ {
// check if we should pass back to other hand // check overrides
// give priority to override action // pass back to right hand?
if ( m_overrideRightHandMovePressed ) if ( m_overrideRightHandDragPressed )
{ {
m_activeMoveHand = vr::TrackedControllerRole_RightHand; m_activeDragHand = vr::TrackedControllerRole_RightHand;
} }
// otherwise check normal action // override of left hand still active?
else if ( m_rightHandMovePressed ) else if ( m_overrideLeftHandDragPressed )
{ {
m_activeMoveHand = vr::TrackedControllerRole_RightHand; m_activeDragHand = vr::TrackedControllerRole_LeftHand;
} }
// check if we should fall back to non-override left hand // check non-override right hand action
else if ( m_leftHandMovePressed ) if ( m_rightHandDragPressed )
{ {
m_activeMoveHand = vr::TrackedControllerRole_LeftHand; m_activeDragHand = vr::TrackedControllerRole_RightHand;
} }
// nothing else is pressed, deactivate move // nothing else is pressed, deactivate move
else else
{ {
m_activeMoveHand = vr::TrackedControllerRole_Invalid; m_activeDragHand = vr::TrackedControllerRole_Invalid;
} }
} }
m_overrideLeftHandMovePressed = overrideLeftHandMoveActive;
} }
m_leftHandDragPressed = leftHandDragActive;
} }
void MoveCenterTabController::optionalOverrideRightHandPlayspaceMove( void MoveCenterTabController::rightHandRoomDrag( bool rightHandDragActive )
bool overrideRightHandMoveActive )
{ {
if ( m_moveShortcutRightEnabled ) if ( !m_settingsRightHandDragEnabled )
{
return;
}
// cancel if other hand is active in override
if ( !m_overrideLeftHandDragPressed )
{ {
// detect new press // detect new press
if ( overrideRightHandMoveActive && !m_overrideRightHandMovePressed ) if ( rightHandDragActive && !m_rightHandDragPressed )
{ {
m_activeMoveHand = vr::TrackedControllerRole_RightHand; m_activeDragHand = vr::TrackedControllerRole_RightHand;
// stop any active rotate because we're in override mode
m_activeRotateHand = vr::TrackedControllerRole_Invalid;
} }
// detect new release // detect new release
else if ( !overrideRightHandMoveActive else if ( !rightHandDragActive && m_rightHandDragPressed )
&& m_overrideRightHandMovePressed )
{ {
// check if we should pass back to other hand // check overrides
// give priority to override action // pass back to left hand?
if ( m_overrideLeftHandMovePressed ) if ( m_overrideLeftHandDragPressed )
{ {
m_activeMoveHand = vr::TrackedControllerRole_LeftHand; m_activeDragHand = vr::TrackedControllerRole_LeftHand;
} }
// otherwise check normal action // override of right hand still active?
else if ( m_leftHandMovePressed ) else if ( m_overrideRightHandDragPressed )
{ {
m_activeMoveHand = vr::TrackedControllerRole_LeftHand; m_activeDragHand = vr::TrackedControllerRole_RightHand;
} }
// check if we should fall back to non-override left hand // check non-override left hand action
else if ( m_rightHandMovePressed ) if ( m_leftHandDragPressed )
{ {
m_activeMoveHand = vr::TrackedControllerRole_RightHand; m_activeDragHand = vr::TrackedControllerRole_LeftHand;
} }
// nothing else is pressed, deactivate move // nothing else is pressed, deactivate move
else else
{ {
m_activeMoveHand = vr::TrackedControllerRole_Invalid; m_activeDragHand = vr::TrackedControllerRole_Invalid;
} }
} }
m_overrideRightHandMovePressed = overrideRightHandMoveActive;
} }
m_rightHandDragPressed = rightHandDragActive;
} }
// END of move bindings void MoveCenterTabController::optionalOverrideLeftHandRoomDrag(
bool overrideLeftHandDragActive )
// START of rotate bindgins
void MoveCenterTabController::leftHandPlayspaceRotate(
bool leftHandRotateActive )
{ {
if ( m_rotateHand ) if ( !m_settingsLeftHandDragEnabled )
{ {
// cancel if other hand is active in override return;
if ( !m_overrideRightHandRotatePressed )
{
// detect new press
if ( leftHandRotateActive && !m_leftHandRotatePressed )
{
m_activeRotateHand = vr::TrackedControllerRole_LeftHand;
}
// detect new release
else if ( !leftHandRotateActive && m_leftHandRotatePressed )
{
// check overrides
// pass back to right hand?
if ( m_overrideRightHandRotatePressed )
{
m_activeRotateHand = vr::TrackedControllerRole_RightHand;
}
// override of left hand still active?
else if ( m_overrideLeftHandRotatePressed )
{
m_activeRotateHand = vr::TrackedControllerRole_LeftHand;
}
// check non-override right hand action
if ( m_rightHandRotatePressed )
{
m_activeRotateHand = vr::TrackedControllerRole_RightHand;
}
// nothing else is pressed, deactivate rotate
else
{
m_activeRotateHand = vr::TrackedControllerRole_Invalid;
}
}
}
m_leftHandRotatePressed = leftHandRotateActive;
} }
} // detect new press
if ( overrideLeftHandDragActive && !m_overrideLeftHandDragPressed )
void MoveCenterTabController::rightHandPlayspaceRotate(
bool rightHandRotateActive )
{
if ( m_rotateHand )
{ {
// cancel if other hand is active in override m_activeDragHand = vr::TrackedControllerRole_LeftHand;
if ( !m_overrideLeftHandRotatePressed ) // stop any active rotate because we're in override mode
{ m_activeTurnHand = vr::TrackedControllerRole_Invalid;
// detect new press
if ( rightHandRotateActive && !m_rightHandRotatePressed )
{
m_activeRotateHand = vr::TrackedControllerRole_RightHand;
}
// detect new release
else if ( !rightHandRotateActive && m_rightHandRotatePressed )
{
// check overrides
// pass back to left hand?
if ( m_overrideLeftHandRotatePressed )
{
m_activeRotateHand = vr::TrackedControllerRole_LeftHand;
}
// override of right hand still active?
else if ( m_overrideRightHandRotatePressed )
{
m_activeRotateHand = vr::TrackedControllerRole_RightHand;
}
// check non-override left hand action
if ( m_leftHandRotatePressed )
{
m_activeRotateHand = vr::TrackedControllerRole_LeftHand;
}
// nothing else is pressed, deactivate rotate
else
{
m_activeRotateHand = vr::TrackedControllerRole_Invalid;
}
}
}
m_rightHandRotatePressed = rightHandRotateActive;
} }
// detect new release
else if ( !overrideLeftHandDragActive && m_overrideLeftHandDragPressed )
{
// check if we should pass back to other hand
// give priority to override action
if ( m_overrideRightHandDragPressed )
{
m_activeDragHand = vr::TrackedControllerRole_RightHand;
}
// otherwise check normal action
else if ( m_rightHandDragPressed )
{
m_activeDragHand = vr::TrackedControllerRole_RightHand;
}
// check if we should fall back to non-override left hand
else if ( m_leftHandDragPressed )
{
m_activeDragHand = vr::TrackedControllerRole_LeftHand;
}
// nothing else is pressed, deactivate move
else
{
m_activeDragHand = vr::TrackedControllerRole_Invalid;
}
}
m_overrideLeftHandDragPressed = overrideLeftHandDragActive;
} }
void MoveCenterTabController::optionalOverrideLeftHandPlayspaceRotate( void MoveCenterTabController::optionalOverrideRightHandRoomDrag(
bool overrideLeftHandRotateActive ) bool overrideRightHandDragActive )
{ {
if ( m_rotateHand ) if ( !m_settingsRightHandDragEnabled )
{
return;
}
// detect new press
if ( overrideRightHandDragActive && !m_overrideRightHandDragPressed )
{
m_activeDragHand = vr::TrackedControllerRole_RightHand;
// stop any active rotate because we're in override mode
m_activeTurnHand = vr::TrackedControllerRole_Invalid;
}
// detect new release
else if ( !overrideRightHandDragActive && m_overrideRightHandDragPressed )
{
// check if we should pass back to other hand
// give priority to override action
if ( m_overrideLeftHandDragPressed )
{
m_activeDragHand = vr::TrackedControllerRole_LeftHand;
}
// otherwise check normal action
else if ( m_leftHandDragPressed )
{
m_activeDragHand = vr::TrackedControllerRole_LeftHand;
}
// check if we should fall back to non-override left hand
else if ( m_rightHandDragPressed )
{
m_activeDragHand = vr::TrackedControllerRole_RightHand;
}
// nothing else is pressed, deactivate move
else
{
m_activeDragHand = vr::TrackedControllerRole_Invalid;
}
}
m_overrideRightHandDragPressed = overrideRightHandDragActive;
}
// END of drag bindings
// START of turn bindgins
void MoveCenterTabController::leftHandRoomTurn( bool leftHandTurnActive )
{
if ( !m_settingsHandTurningEnabled )
{
return;
}
// cancel if other hand is active in override
if ( !m_overrideRightHandTurnPressed )
{ {
// detect new press // detect new press
if ( overrideLeftHandRotateActive && !m_overrideLeftHandRotatePressed ) if ( leftHandTurnActive && !m_leftHandTurnPressed )
{ {
m_activeRotateHand = vr::TrackedControllerRole_LeftHand; m_activeTurnHand = vr::TrackedControllerRole_LeftHand;
// stop any active move because we're in override mode
m_activeMoveHand = vr::TrackedControllerRole_Invalid;
} }
// detect new release // detect new release
else if ( !overrideLeftHandRotateActive else if ( !leftHandTurnActive && m_leftHandTurnPressed )
&& m_overrideLeftHandRotatePressed )
{ {
// check if we should pass back to other hand // check overrides
// give priority to override action // pass back to right hand?
if ( m_overrideRightHandRotatePressed ) if ( m_overrideRightHandTurnPressed )
{ {
m_activeRotateHand = vr::TrackedControllerRole_RightHand; m_activeTurnHand = vr::TrackedControllerRole_RightHand;
} }
// otherwise check normal action // override of left hand still active?
else if ( m_rightHandRotatePressed ) else if ( m_overrideLeftHandTurnPressed )
{ {
m_activeRotateHand = vr::TrackedControllerRole_RightHand; m_activeTurnHand = vr::TrackedControllerRole_LeftHand;
} }
// check if we should fall back to non-override left hand // check non-override right hand action
else if ( m_leftHandRotatePressed ) if ( m_rightHandTurnPressed )
{ {
m_activeRotateHand = vr::TrackedControllerRole_LeftHand; m_activeTurnHand = vr::TrackedControllerRole_RightHand;
} }
// nothing else is pressed, deactivate rotate // nothing else is pressed, deactivate rotate
else else
{ {
m_activeRotateHand = vr::TrackedControllerRole_Invalid; m_activeTurnHand = vr::TrackedControllerRole_Invalid;
} }
} }
m_overrideLeftHandRotatePressed = overrideLeftHandRotateActive;
} }
m_leftHandTurnPressed = leftHandTurnActive;
} }
void MoveCenterTabController::optionalOverrideRightHandPlayspaceRotate( void MoveCenterTabController::rightHandRoomTurn( bool rightHandTurnActive )
bool overrideRightHandRotateActive )
{ {
if ( m_rotateHand ) if ( !m_settingsHandTurningEnabled )
{
return;
}
// cancel if other hand is active in override
if ( !m_overrideLeftHandTurnPressed )
{ {
// detect new press // detect new press
if ( overrideRightHandRotateActive if ( rightHandTurnActive && !m_rightHandTurnPressed )
&& !m_overrideRightHandRotatePressed )
{ {
m_activeRotateHand = vr::TrackedControllerRole_RightHand; m_activeTurnHand = vr::TrackedControllerRole_RightHand;
// stop any active move because we're in override mode
m_activeMoveHand = vr::TrackedControllerRole_Invalid;
} }
// detect new release // detect new release
else if ( !overrideRightHandRotateActive else if ( !rightHandTurnActive && m_rightHandTurnPressed )
&& m_overrideRightHandRotatePressed )
{ {
// check if we should pass back to other hand // check overrides
// give priority to override action // pass back to left hand?
if ( m_overrideLeftHandRotatePressed ) if ( m_overrideLeftHandTurnPressed )
{ {
m_activeRotateHand = vr::TrackedControllerRole_LeftHand; m_activeTurnHand = vr::TrackedControllerRole_LeftHand;
} }
// otherwise check normal action // override of right hand still active?
else if ( m_leftHandRotatePressed ) else if ( m_overrideRightHandTurnPressed )
{ {
m_activeRotateHand = vr::TrackedControllerRole_LeftHand; m_activeTurnHand = vr::TrackedControllerRole_RightHand;
} }
// check if we should fall back to non-override left hand // check non-override left hand action
else if ( m_rightHandRotatePressed ) if ( m_leftHandTurnPressed )
{ {
m_activeRotateHand = vr::TrackedControllerRole_RightHand; m_activeTurnHand = vr::TrackedControllerRole_LeftHand;
} }
// nothing else is pressed, deactivate rotate // nothing else is pressed, deactivate rotate
else else
{ {
m_activeRotateHand = vr::TrackedControllerRole_Invalid; m_activeTurnHand = vr::TrackedControllerRole_Invalid;
} }
} }
m_overrideRightHandRotatePressed = overrideRightHandRotateActive;
} }
m_rightHandTurnPressed = rightHandTurnActive;
} }
// END of rotate bindings. void MoveCenterTabController::optionalOverrideLeftHandRoomTurn(
bool overrideLeftHandTurnActive )
/*
bool isMoveShortCutPressed( vr::ETrackedControllerRole hand )
{ {
auto handId if ( !m_settingsHandTurningEnabled )
= vr::VRSystem()->GetTrackedDeviceIndexForControllerRole( hand );
if ( handId == vr::k_unTrackedDeviceIndexInvalid
|| handId >= vr::k_unMaxTrackedDeviceCount )
{ {
return false; return;
} }
// detect new press
vr::VRControllerState_t state; if ( overrideLeftHandTurnActive && !m_overrideLeftHandTurnPressed )
if ( vr::VRSystem()->GetControllerState(
handId, &state, sizeof( vr::VRControllerState_t ) ) )
{ {
return state.ulButtonPressed m_activeTurnHand = vr::TrackedControllerRole_LeftHand;
& vr::ButtonMaskFromId( vr::k_EButton_ApplicationMenu ); // stop any active move because we're in override mode
m_activeDragHand = vr::TrackedControllerRole_Invalid;
} }
// detect new release
return false; else if ( !overrideLeftHandTurnActive && m_overrideLeftHandTurnPressed )
{
// check if we should pass back to other hand
// give priority to override action
if ( m_overrideRightHandTurnPressed )
{
m_activeTurnHand = vr::TrackedControllerRole_RightHand;
}
// otherwise check normal action
else if ( m_rightHandTurnPressed )
{
m_activeTurnHand = vr::TrackedControllerRole_RightHand;
}
// check if we should fall back to non-override left hand
else if ( m_leftHandTurnPressed )
{
m_activeTurnHand = vr::TrackedControllerRole_LeftHand;
}
// nothing else is pressed, deactivate rotate
else
{
m_activeTurnHand = vr::TrackedControllerRole_Invalid;
}
}
m_overrideLeftHandTurnPressed = overrideLeftHandTurnActive;
} }
*/
/* void MoveCenterTabController::optionalOverrideRightHandRoomTurn(
vr::ETrackedControllerRole MoveCenterTabController::getMoveShortcutHand() bool overrideRightHandTurnActive )
{ {
auto activeHand = m_activeMoveController; if ( !m_settingsHandTurningEnabled )
bool rightPressed
= m_moveShortcutRightEnabled
&& isMoveShortCutPressed( vr::TrackedControllerRole_RightHand );
bool leftPressed
= m_moveShortcutLeftEnabled
&& isMoveShortCutPressed( vr::TrackedControllerRole_LeftHand );
bool checkDoubleClick = m_requireDoubleClick
&& activeHand == vr::TrackedControllerRole_Invalid;
auto now = clock::now();
// if we start pressing the shortcut on a controller we set the active one
// to it
if ( rightPressed && !m_moveShortcutRightPressed )
{ {
auto elapsed return;
= duration_cast<milliseconds>( now - lastMoveButtonClick[0] ) }
.count(); // detect new press
if ( !checkDoubleClick || elapsed < 250 ) if ( overrideRightHandTurnActive && !m_overrideRightHandTurnPressed )
{
m_activeTurnHand = vr::TrackedControllerRole_RightHand;
// stop any active move because we're in override mode
m_activeDragHand = vr::TrackedControllerRole_Invalid;
}
// detect new release
else if ( !overrideRightHandTurnActive && m_overrideRightHandTurnPressed )
{
// check if we should pass back to other hand
// give priority to override action
if ( m_overrideLeftHandTurnPressed )
{ {
activeHand = vr::TrackedControllerRole_RightHand; m_activeTurnHand = vr::TrackedControllerRole_LeftHand;
} }
lastMoveButtonClick[0] = now; // otherwise check normal action
} else if ( m_leftHandTurnPressed )
if ( leftPressed && !m_moveShortcutLeftPressed )
{
auto elapsed
= duration_cast<milliseconds>( now - lastMoveButtonClick[1] )
.count();
if ( !checkDoubleClick || elapsed < 250 )
{ {
activeHand = vr::TrackedControllerRole_LeftHand; m_activeTurnHand = vr::TrackedControllerRole_LeftHand;
} }
lastMoveButtonClick[1] = now; // check if we should fall back to non-override left hand
} else if ( m_rightHandTurnPressed )
// if we let down of a shortcut we set the active hand to any remaining
// pressed down hand
if ( !rightPressed && m_moveShortcutRightPressed )
{
activeHand = leftPressed ? vr::TrackedControllerRole_LeftHand
: vr::TrackedControllerRole_Invalid;
}
if ( !leftPressed && m_moveShortcutLeftPressed )
{
activeHand = rightPressed ? vr::TrackedControllerRole_RightHand
: vr::TrackedControllerRole_Invalid;
}
if ( !leftPressed && !rightPressed )
{
activeHand = vr::TrackedControllerRole_Invalid;
if ( m_activeMoveController != vr::TrackedControllerRole_Invalid )
{ {
// grace period while switching hands m_activeTurnHand = vr::TrackedControllerRole_RightHand;
lastMoveButtonClick[0] = lastMoveButtonClick[1] = now; }
// nothing else is pressed, deactivate rotate
else
{
m_activeTurnHand = vr::TrackedControllerRole_Invalid;
} }
} }
m_overrideRightHandTurnPressed = overrideRightHandTurnActive;
m_activeMoveController = activeHand;
m_moveShortcutRightPressed = rightPressed;
m_moveShortcutLeftPressed = leftPressed;
return activeHand;
} }
*/
// END of turn bindings.
void MoveCenterTabController::eventLoopTick( void MoveCenterTabController::eventLoopTick(
vr::ETrackingUniverseOrigin universe, vr::ETrackingUniverseOrigin universe,
@@ -1080,12 +966,12 @@ void MoveCenterTabController::eventLoopTick(
} }
*/ */
auto moveHandId = vr::VRSystem()->GetTrackedDeviceIndexForControllerRole( auto moveHandId = vr::VRSystem()->GetTrackedDeviceIndexForControllerRole(
m_activeMoveHand ); m_activeDragHand );
auto rotateHandId = vr::VRSystem()->GetTrackedDeviceIndexForControllerRole( auto rotateHandId = vr::VRSystem()->GetTrackedDeviceIndexForControllerRole(
m_activeRotateHand ); m_activeTurnHand );
// START of hand move // START of hand move
if ( m_activeMoveHand == vr::TrackedControllerRole_Invalid if ( m_activeDragHand == vr::TrackedControllerRole_Invalid
|| moveHandId == vr::k_unTrackedDeviceIndexInvalid || moveHandId == vr::k_unTrackedDeviceIndexInvalid
|| moveHandId >= vr::k_unMaxTrackedDeviceCount ) || moveHandId >= vr::k_unMaxTrackedDeviceCount )
{ {
@@ -1095,7 +981,7 @@ void MoveCenterTabController::eventLoopTick(
emit offsetYChanged( m_offsetY ); emit offsetYChanged( m_offsetY );
emit offsetZChanged( m_offsetZ ); emit offsetZChanged( m_offsetZ );
} }
m_lastMoveHand = m_activeMoveHand; m_lastMoveHand = m_activeDragHand;
} }
else else
{ {
@@ -1103,7 +989,7 @@ void MoveCenterTabController::eventLoopTick(
if ( !movePose->bPoseIsValid || !movePose->bDeviceIsConnected if ( !movePose->bPoseIsValid || !movePose->bDeviceIsConnected
|| movePose->eTrackingResult != vr::TrackingResult_Running_OK ) || movePose->eTrackingResult != vr::TrackingResult_Running_OK )
{ {
m_lastMoveHand = m_activeMoveHand; m_lastMoveHand = m_activeDragHand;
} }
else else
{ {
@@ -1119,7 +1005,7 @@ void MoveCenterTabController::eventLoopTick(
static_cast<float>( relativeControllerPosition[2] ) + m_offsetZ, static_cast<float>( relativeControllerPosition[2] ) + m_offsetZ,
}; };
if ( m_lastMoveHand == m_activeMoveHand ) if ( m_lastMoveHand == m_activeDragHand )
{ {
double diff[3] = { double diff[3] = {
absoluteControllerPosition[0] - m_lastControllerPosition[0], absoluteControllerPosition[0] - m_lastControllerPosition[0],
@@ -1177,13 +1063,13 @@ void MoveCenterTabController::eventLoopTick(
m_lastControllerPosition[0] = absoluteControllerPosition[0]; m_lastControllerPosition[0] = absoluteControllerPosition[0];
m_lastControllerPosition[1] = absoluteControllerPosition[1]; m_lastControllerPosition[1] = absoluteControllerPosition[1];
m_lastControllerPosition[2] = absoluteControllerPosition[2]; m_lastControllerPosition[2] = absoluteControllerPosition[2];
m_lastMoveHand = m_activeMoveHand; m_lastMoveHand = m_activeDragHand;
} }
} // END of hand move } // END of hand move
// START of hand rotation // START of hand rotation
if ( m_activeRotateHand == vr::TrackedControllerRole_Invalid if ( m_activeTurnHand == vr::TrackedControllerRole_Invalid
|| rotateHandId == vr::k_unTrackedDeviceIndexInvalid || rotateHandId == vr::k_unTrackedDeviceIndexInvalid
|| rotateHandId >= vr::k_unMaxTrackedDeviceCount ) || rotateHandId >= vr::k_unMaxTrackedDeviceCount )
{ {
@@ -1193,7 +1079,7 @@ void MoveCenterTabController::eventLoopTick(
// (-1000.0) // (-1000.0)
lastHandQuaternion.w = -1000.0; lastHandQuaternion.w = -1000.0;
} }
m_lastRotateHand = m_activeRotateHand; m_lastRotateHand = m_activeTurnHand;
} }
else else
{ {
@@ -1201,7 +1087,7 @@ void MoveCenterTabController::eventLoopTick(
if ( !rotatePose->bPoseIsValid || !rotatePose->bDeviceIsConnected if ( !rotatePose->bPoseIsValid || !rotatePose->bDeviceIsConnected
|| rotatePose->eTrackingResult != vr::TrackingResult_Running_OK ) || rotatePose->eTrackingResult != vr::TrackingResult_Running_OK )
{ {
m_lastRotateHand = m_activeRotateHand; m_lastRotateHand = m_activeTurnHand;
} }
else else
{ {
@@ -1224,7 +1110,7 @@ void MoveCenterTabController::eventLoopTick(
// Convert pose matrix to quaternion // Convert pose matrix to quaternion
handQuaternion = utils::getQuaternion( handMatrixAbsolute ); handQuaternion = utils::getQuaternion( handMatrixAbsolute );
if ( m_lastRotateHand == m_activeRotateHand ) if ( m_lastRotateHand == m_activeTurnHand )
{ {
// Get rotation change of hand. // Get rotation change of hand.
// Checking if set to -1000.0 placeholder for invalid hand. // Checking if set to -1000.0 placeholder for invalid hand.
@@ -1271,7 +1157,7 @@ void MoveCenterTabController::eventLoopTick(
} }
} }
lastHandQuaternion = handQuaternion; lastHandQuaternion = handQuaternion;
m_lastRotateHand = m_activeRotateHand; m_lastRotateHand = m_activeTurnHand;
} }
} // END of hand rotation } // END of hand rotation
} }
+21 -31
View File
@@ -33,8 +33,6 @@ class MoveCenterTabController : public QObject
setMoveShortcutRight NOTIFY moveShortcutRightChanged ) setMoveShortcutRight NOTIFY moveShortcutRightChanged )
Q_PROPERTY( bool moveShortcutLeft READ moveShortcutLeft WRITE Q_PROPERTY( bool moveShortcutLeft READ moveShortcutLeft WRITE
setMoveShortcutLeft NOTIFY moveShortcutLeftChanged ) setMoveShortcutLeft NOTIFY moveShortcutLeftChanged )
Q_PROPERTY( bool requireDoubleClick READ requireDoubleClick WRITE
setRequireDoubleClick NOTIFY requireDoubleClickChanged )
Q_PROPERTY( bool lockXToggle READ lockXToggle WRITE setLockX NOTIFY Q_PROPERTY( bool lockXToggle READ lockXToggle WRITE setLockX NOTIFY
requireLockXChanged ) requireLockXChanged )
Q_PROPERTY( bool lockYToggle READ lockYToggle WRITE setLockY NOTIFY Q_PROPERTY( bool lockYToggle READ lockYToggle WRITE setLockY NOTIFY
@@ -55,14 +53,13 @@ private:
int m_rotation = 0; int m_rotation = 0;
int m_tempRotation = 0; int m_tempRotation = 0;
bool m_adjustChaperone = true; bool m_adjustChaperone = true;
bool m_rotateHand = false; bool m_settingsHandTurningEnabled = false;
bool m_moveShortcutRightPressed = false; bool m_moveShortcutRightPressed = false;
bool m_moveShortcutLeftPressed = false; bool m_moveShortcutLeftPressed = false;
vr::TrackedDeviceIndex_t m_activeMoveController; vr::TrackedDeviceIndex_t m_activeMoveController;
float m_lastControllerPosition[3]; float m_lastControllerPosition[3];
bool m_moveShortcutRightEnabled = false; bool m_settingsRightHandDragEnabled = false;
bool m_moveShortcutLeftEnabled = false; bool m_settingsLeftHandDragEnabled = false;
bool m_requireDoubleClick = false;
bool m_lockXToggle = false; bool m_lockXToggle = false;
bool m_lockYToggle = false; bool m_lockYToggle = false;
bool m_lockZToggle = false; bool m_lockZToggle = false;
@@ -74,22 +71,22 @@ private:
vr::HmdQuaternion_t lastHmdQuaternion = { -1000.0, 0.0, 0.0, 0.0 }; vr::HmdQuaternion_t lastHmdQuaternion = { -1000.0, 0.0, 0.0, 0.0 };
vr::HmdQuaternion_t hmdQuaternion; vr::HmdQuaternion_t hmdQuaternion;
double m_hmdYawTotal = 0.0; double m_hmdYawTotal = 0.0;
vr::ETrackedControllerRole m_activeMoveHand vr::ETrackedControllerRole m_activeDragHand
= vr::TrackedControllerRole_Invalid; = vr::TrackedControllerRole_Invalid;
vr::ETrackedControllerRole m_lastMoveHand vr::ETrackedControllerRole m_lastMoveHand
= vr::TrackedControllerRole_Invalid; = vr::TrackedControllerRole_Invalid;
vr::ETrackedControllerRole m_activeRotateHand vr::ETrackedControllerRole m_activeTurnHand
= vr::TrackedControllerRole_Invalid; = vr::TrackedControllerRole_Invalid;
vr::ETrackedControllerRole m_lastRotateHand vr::ETrackedControllerRole m_lastRotateHand
= vr::TrackedControllerRole_Invalid; = vr::TrackedControllerRole_Invalid;
bool m_leftHandMovePressed = false; bool m_leftHandDragPressed = false;
bool m_rightHandMovePressed = false; bool m_rightHandDragPressed = false;
bool m_overrideLeftHandMovePressed = false; bool m_overrideLeftHandDragPressed = false;
bool m_overrideRightHandMovePressed = false; bool m_overrideRightHandDragPressed = false;
bool m_leftHandRotatePressed = false; bool m_leftHandTurnPressed = false;
bool m_rightHandRotatePressed = false; bool m_rightHandTurnPressed = false;
bool m_overrideLeftHandRotatePressed = false; bool m_overrideLeftHandTurnPressed = false;
bool m_overrideRightHandRotatePressed = false; bool m_overrideRightHandTurnPressed = false;
unsigned settingsUpdateCounter = 0; unsigned settingsUpdateCounter = 0;
@@ -111,7 +108,6 @@ public:
bool rotateHand() const; bool rotateHand() const;
bool moveShortcutRight() const; bool moveShortcutRight() const;
bool moveShortcutLeft() const; bool moveShortcutLeft() const;
bool requireDoubleClick() const;
bool lockXToggle() const; bool lockXToggle() const;
bool lockYToggle() const; bool lockYToggle() const;
bool lockZToggle() const; bool lockZToggle() const;
@@ -119,18 +115,14 @@ public:
void resetHmdYawTotal(); void resetHmdYawTotal();
// actions: // actions:
void leftHandPlayspaceMove( bool leftHandMoveActive ); void leftHandRoomDrag( bool leftHandDragActive );
void rightHandPlayspaceMove( bool rightHandMoveActive ); void rightHandRoomDrag( bool rightHandDragActive );
void optionalOverrideLeftHandPlayspaceMove( void optionalOverrideLeftHandRoomDrag( bool overrideLeftHandDragActive );
bool overrideLeftHandMoveActive ); void optionalOverrideRightHandRoomDrag( bool overrideRightHandDragActive );
void optionalOverrideRightHandPlayspaceMove( void leftHandRoomTurn( bool leftHandTurnActive );
bool overrideRightHandMoveActive ); void rightHandRoomTurn( bool rightHandTurnActive );
void leftHandPlayspaceRotate( bool leftHandRotateActive ); void optionalOverrideLeftHandRoomTurn( bool overrideLeftHandTurnActive );
void rightHandPlayspaceRotate( bool rightHandRotateActive ); void optionalOverrideRightHandRoomTurn( bool overrideRightHandTurnActive );
void optionalOverrideLeftHandPlayspaceRotate(
bool overrideLeftHandRotateActive );
void optionalOverrideRightHandPlayspaceRotate(
bool overrideRightHandRotateActive );
public slots: public slots:
int trackingUniverse() const; int trackingUniverse() const;
@@ -150,7 +142,6 @@ public slots:
void setMoveShortcutRight( bool value, bool notify = true ); void setMoveShortcutRight( bool value, bool notify = true );
void setMoveShortcutLeft( bool value, bool notify = true ); void setMoveShortcutLeft( bool value, bool notify = true );
void setRequireDoubleClick( bool value, bool notify = true );
void modOffsetX( float value, bool notify = true ); void modOffsetX( float value, bool notify = true );
void modOffsetY( float value, bool notify = true ); void modOffsetY( float value, bool notify = true );
@@ -174,7 +165,6 @@ signals:
void rotateHandChanged( bool value ); void rotateHandChanged( bool value );
void moveShortcutRightChanged( bool value ); void moveShortcutRightChanged( bool value );
void moveShortcutLeftChanged( bool value ); void moveShortcutLeftChanged( bool value );
void requireDoubleClickChanged( bool value );
void requireLockXChanged( bool value ); void requireLockXChanged( bool value );
void requireLockYChanged( bool value ); void requireLockYChanged( bool value );
void requireLockZChanged( bool value ); void requireLockZChanged( bool value );
@@ -78,9 +78,8 @@ void StatisticsTabController::eventLoopTick(
} }
// HMD Rotation // // HMD Rotation //
double playspaceHmdYawTotal double roomHmdYawTotal = parent->m_moveCenterTabController.getHmdYawTotal();
= parent->m_moveCenterTabController.getHmdYawTotal(); m_hmdRotation = static_cast<float>( roomHmdYawTotal / ( 2.0 * M_PI ) );
m_hmdRotation = static_cast<float>( playspaceHmdYawTotal / ( 2.0 * M_PI ) );
if ( lastPosTimer <= 0 ) if ( lastPosTimer <= 0 )
{ {