mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +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++;
|
numTrackedControllers++;
|
||||||
bool left = numTrackedControllers == 1;
|
bool left = numTrackedControllers == 2;
|
||||||
|
|
||||||
const mat4& mat = _trackedDevicePoseMat4[device];
|
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
|
// 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) {
|
void ViveControllerManager::handleAxisEvent(uint32_t axis, float x, float y, bool left) {
|
||||||
#ifdef Q_OS_WIN
|
#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;
|
axis += vr::k_EButton_Axis0;
|
||||||
using namespace controller;
|
using namespace controller;
|
||||||
if (axis == vr::k_EButton_SteamVR_Touchpad) {
|
if (axis == vr::k_EButton_SteamVR_Touchpad) {
|
||||||
_axisStateMap[left ? LX : RX] = x;
|
_axisStateMap[left ? LX : RX] = x;
|
||||||
_axisStateMap[left ? LY : RY] = y;
|
_axisStateMap[left ? LY : RY] = y;
|
||||||
} else if (axis == vr::k_EButton_SteamVR_Trigger) {
|
} else if (axis == vr::k_EButton_SteamVR_Trigger) {
|
||||||
//FIX ME: Seems that enters here everytime
|
|
||||||
_axisStateMap[left ? LT : RT] = x;
|
_axisStateMap[left ? LT : RT] = x;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue