mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-05 20:41:21 +02:00
Move ThumbUp gesture detection into json map file.
This commit is contained in:
parent
af751c8b8c
commit
7319998df9
2 changed files with 12 additions and 11 deletions
|
@ -22,6 +22,10 @@
|
||||||
|
|
||||||
{ "from": "Vive.LeftGrip", "to": "Standard.LeftGrip" },
|
{ "from": "Vive.LeftGrip", "to": "Standard.LeftGrip" },
|
||||||
{ "from": "Vive.LS", "to": "Standard.LS" },
|
{ "from": "Vive.LS", "to": "Standard.LS" },
|
||||||
|
{ "from": "Vive.LSTouch", "to": "Standard.LeftThumbUp",
|
||||||
|
"peek": true,
|
||||||
|
"filters": [ { "type": "not" } ]
|
||||||
|
},
|
||||||
{ "from": "Vive.LSTouch", "to": "Standard.LSTouch" },
|
{ "from": "Vive.LSTouch", "to": "Standard.LSTouch" },
|
||||||
|
|
||||||
{ "from": "Vive.RY", "when": "Vive.RSY", "filters": ["invert"], "to": "Standard.RY" },
|
{ "from": "Vive.RY", "when": "Vive.RSY", "filters": ["invert"], "to": "Standard.RY" },
|
||||||
|
@ -36,6 +40,10 @@
|
||||||
|
|
||||||
{ "from": "Vive.RightGrip", "to": "Standard.RightGrip" },
|
{ "from": "Vive.RightGrip", "to": "Standard.RightGrip" },
|
||||||
{ "from": "Vive.RS", "to": "Standard.RS" },
|
{ "from": "Vive.RS", "to": "Standard.RS" },
|
||||||
|
{ "from": "Vive.RSTouch", "to": "Standard.RightThumbUp",
|
||||||
|
"peek": true,
|
||||||
|
"filters": [ { "type": "not" } ]
|
||||||
|
},
|
||||||
{ "from": "Vive.RSTouch", "to": "Standard.RSTouch" },
|
{ "from": "Vive.RSTouch", "to": "Standard.RSTouch" },
|
||||||
|
|
||||||
{ "from": "Vive.LSCenter", "to": "Standard.LeftPrimaryThumb" },
|
{ "from": "Vive.LSCenter", "to": "Standard.LeftPrimaryThumb" },
|
||||||
|
@ -69,8 +77,6 @@
|
||||||
{ "from": "Vive.Head", "to" : "Standard.Head"},
|
{ "from": "Vive.Head", "to" : "Standard.Head"},
|
||||||
|
|
||||||
{ "from": "Vive.RightArm", "to" : "Standard.RightArm" },
|
{ "from": "Vive.RightArm", "to" : "Standard.RightArm" },
|
||||||
{ "from": "Vive.LeftArm", "to" : "Standard.LeftArm" },
|
{ "from": "Vive.LeftArm", "to" : "Standard.LeftArm" }
|
||||||
{ "from": "Vive.LeftThumbUp", "to": "Standard.LeftThumbUp" },
|
|
||||||
{ "from": "Vive.RightThumbUp", "to": "Standard.RightThumbUp" }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -863,11 +863,9 @@ void ViveControllerManager::InputDevice::handleButtonEvent(float deltaTime, uint
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (button == vr::k_EButton_SteamVR_Touchpad) {
|
|
||||||
if (touched) {
|
if (touched) {
|
||||||
|
if (button == vr::k_EButton_SteamVR_Touchpad) {
|
||||||
_buttonPressedMap.insert(isLeftHand ? LS_TOUCH : RS_TOUCH);
|
_buttonPressedMap.insert(isLeftHand ? LS_TOUCH : RS_TOUCH);
|
||||||
} else {
|
|
||||||
_buttonPressedMap.insert(isLeftHand ? LEFT_THUMB_UP : RIGHT_THUMB_UP);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1172,9 +1170,6 @@ controller::Input::NamedVector ViveControllerManager::InputDevice::getAvailableI
|
||||||
// app button above trackpad.
|
// app button above trackpad.
|
||||||
Input::NamedPair(Input(_deviceID, LEFT_APP_MENU, ChannelType::BUTTON), "LeftApplicationMenu"),
|
Input::NamedPair(Input(_deviceID, LEFT_APP_MENU, ChannelType::BUTTON), "LeftApplicationMenu"),
|
||||||
Input::NamedPair(Input(_deviceID, RIGHT_APP_MENU, ChannelType::BUTTON), "RightApplicationMenu"),
|
Input::NamedPair(Input(_deviceID, RIGHT_APP_MENU, ChannelType::BUTTON), "RightApplicationMenu"),
|
||||||
|
|
||||||
makePair(LEFT_THUMB_UP, "LeftThumbUp"),
|
|
||||||
makePair(RIGHT_THUMB_UP, "RightThumbUp"),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return availableInputs;
|
return availableInputs;
|
||||||
|
|
Loading…
Reference in a new issue