Merge pull request #6331 from AlessandroSigna/controllers

Changes to Standard.RY
This commit is contained in:
Brad Davis 2015-11-06 14:24:59 -08:00
commit 55dc486556
2 changed files with 14 additions and 2 deletions

View file

@ -14,8 +14,17 @@
]
},
{ "from": "Standard.RX", "to": "Actions.Yaw" },
{ "from": "Standard.RY", "when": "!Application.InHMD", "to": "Actions.Pitch" },
{ "from": "Standard.RY",
"when": "Application.Grounded",
"to": "Actions.Up",
"filters":
[
{ "type": "deadZone", "min": 0.95 },
"invert"
]
},
{ "from": "Standard.RY", "to": "Actions.Up", "filters": "invert"},
{ "from": [ "Standard.DU", "Standard.DL", "Standard.DR", "Standard.DD" ], "to": "Standard.LeftPrimaryThumb" },
{ "from": "Standard.Back", "to": "Standard.LeftSecondaryThumb" },

View file

@ -646,6 +646,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
_applicationStateDevice->addInputVariant(QString("ComfortMode"), controller::StateController::ReadLambda([]() -> float {
return (float)Menu::getInstance()->isOptionChecked(MenuOption::ComfortMode);
}));
_applicationStateDevice->addInputVariant(QString("Grounded"), controller::StateController::ReadLambda([]() -> float {
return (float)qApp->getMyAvatar()->getCharacterController()->onGround();
}));
userInputMapper->registerDevice(_applicationStateDevice);