mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 23:33:48 +02:00
Merge pull request #6252 from AlessandroSigna/controllers2
Vive controller - fix inverted inputs
This commit is contained in:
commit
ee50df0e2e
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue