Merge pull request #8063 from SamGondelman/viveGripFix

Reset Vive grip buttons to 0 if not pressed
This commit is contained in:
Brad Hefta-Gaub 2016-06-14 11:47:49 -07:00 committed by GitHub
commit c614b10694

View file

@ -363,6 +363,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) {