Merge pull request #6252 from AlessandroSigna/controllers2

Vive controller - fix inverted inputs
This commit is contained in:
Brad Davis 2015-10-30 17:26:34 -07:00
commit ee50df0e2e

View file

@ -254,7 +254,7 @@ void ViveControllerManager::update(float deltaTime, bool jointsCaptured) {
}
numTrackedControllers++;
bool left = numTrackedControllers == 1;
bool left = numTrackedControllers == 2;
const mat4& mat = _trackedDevicePoseMat4[device];
@ -307,13 +307,13 @@ void ViveControllerManager::focusOutEvent() {
// These functions do translation from the Steam IDs to the standard controller IDs
void ViveControllerManager::handleAxisEvent(uint32_t axis, float x, float y, bool left) {
#ifdef Q_OS_WIN
//FIX ME? It enters here every frame: probably we want to enter only if an event occurs
axis += vr::k_EButton_Axis0;
using namespace controller;
if (axis == vr::k_EButton_SteamVR_Touchpad) {
_axisStateMap[left ? LX : RX] = x;
_axisStateMap[left ? LY : RY] = y;
} else if (axis == vr::k_EButton_SteamVR_Trigger) {
//FIX ME: Seems that enters here everytime
_axisStateMap[left ? LT : RT] = x;
}
#endif