mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 21:35:04 +02:00
Adding vive default mapping
This commit is contained in:
parent
f61cf843bc
commit
f38303a9a5
2 changed files with 24 additions and 2 deletions
22
interface/resources/controllers/vive.json
Normal file
22
interface/resources/controllers/vive.json
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"name": "XBox to Standard",
|
||||||
|
"channels": [
|
||||||
|
{ "from": "Vive.LY", "to": "Standard.LY" },
|
||||||
|
{ "from": "Vive.LX", "to": "Standard.LX" },
|
||||||
|
{ "from": "Vive.LT", "to": "Standard.LT" },
|
||||||
|
{ "from": "Vive.LB", "to": "Standard.LB" },
|
||||||
|
{ "from": "Vive.LS", "to": "Standard.LS" },
|
||||||
|
|
||||||
|
{ "from": "Vive.RY", "to": "Standard.RY" },
|
||||||
|
{ "from": "Vive.RX", "to": "Standard.RX" },
|
||||||
|
{ "from": "Vive.RT", "to": "Standard.RT" },
|
||||||
|
{ "from": "Vive.RB", "to": "Standard.RB" },
|
||||||
|
{ "from": "Vive.RS", "to": "Standard.RS" },
|
||||||
|
|
||||||
|
{ "from": "Vive.Back", "to": "Standard.Back" },
|
||||||
|
{ "from": "Vive.Start", "to": "Standard.Start" },
|
||||||
|
|
||||||
|
{ "from": "Vive.A", "to": "Standard.A" },
|
||||||
|
{ "from": "Vive.B", "to": "Standard.B" }
|
||||||
|
]
|
||||||
|
}
|
|
@ -45,7 +45,7 @@ const QString MENU_PATH = MENU_PARENT + ">" + MENU_NAME;
|
||||||
const QString RENDER_CONTROLLERS = "Render Hand Controllers";
|
const QString RENDER_CONTROLLERS = "Render Hand Controllers";
|
||||||
|
|
||||||
ViveControllerManager::ViveControllerManager() :
|
ViveControllerManager::ViveControllerManager() :
|
||||||
InputDevice("SteamVR Controller"),
|
InputDevice("Vive"),
|
||||||
_trackedControllers(0),
|
_trackedControllers(0),
|
||||||
_modelLoaded(false),
|
_modelLoaded(false),
|
||||||
_leftHandRenderID(0),
|
_leftHandRenderID(0),
|
||||||
|
@ -313,7 +313,7 @@ void ViveControllerManager::handleButtonEvent(uint32_t button, bool pressed, boo
|
||||||
|
|
||||||
if (button == vr::k_EButton_ApplicationMenu) {
|
if (button == vr::k_EButton_ApplicationMenu) {
|
||||||
// FIXME?
|
// FIXME?
|
||||||
_buttonPressedMap.insert(left ? controller::A : controller::A);
|
_buttonPressedMap.insert(left ? controller::B : controller::A);
|
||||||
} else if (button == vr::k_EButton_Grip) {
|
} else if (button == vr::k_EButton_Grip) {
|
||||||
// Tony says these are harder to reach, so make them the meta buttons
|
// Tony says these are harder to reach, so make them the meta buttons
|
||||||
_buttonPressedMap.insert(left ? controller::BACK : controller::START);
|
_buttonPressedMap.insert(left ? controller::BACK : controller::START);
|
||||||
|
|
Loading…
Reference in a new issue