mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 23:26:25 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into controllers
This commit is contained in:
commit
78e6fe5563
2 changed files with 8 additions and 3 deletions
|
@ -366,5 +366,10 @@ AvatarSharedPointer AvatarManager::getAvatarBySessionID(const QUuid& sessionID)
|
|||
return std::static_pointer_cast<Avatar>(_myAvatar);
|
||||
}
|
||||
QReadLocker locker(&_hashLock);
|
||||
return _avatarHash[sessionID];
|
||||
auto iter = _avatarHash.find(sessionID);
|
||||
if (iter != _avatarHash.end()) {
|
||||
return iter.value();
|
||||
} else {
|
||||
return AvatarSharedPointer();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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