Fix for Vive RIGHT_GRIP LEFT_GRIP button never becoming zero.

This commit is contained in:
Anthony J. Thibault 2016-06-13 18:55:53 -07:00
parent 28b6cc2777
commit f11735550f

View file

@ -370,6 +370,10 @@ void ViveControllerManager::InputDevice::handleButtonEvent(float deltaTime, uint
} else if (button == vr::k_EButton_SteamVR_Touchpad) {
_buttonPressedMap.insert(isLeftHand ? LS : RS);
}
} else {
if (button == vr::k_EButton_Grip) {
_axisStateMap[isLeftHand ? LEFT_GRIP : RIGHT_GRIP] = 0.0f;
}
}
if (touched) {