mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 01:12:48 +02:00
Moved device class check into handleTrackedObject
This commit is contained in:
parent
42262aac78
commit
4e49774d0e
1 changed files with 2 additions and 7 deletions
|
@ -142,13 +142,7 @@ void ViveControllerManager::InputDevice::update(float deltaTime, const controlle
|
|||
|
||||
// collect poses for all generic trackers
|
||||
for (int i = 0; i < vr::k_unMaxTrackedDeviceCount; i++) {
|
||||
if (_system->GetTrackedDeviceClass(i) == vr::TrackedDeviceClass_GenericTracker) {
|
||||
handleTrackedObject(i, inputCalibrationData);
|
||||
} else {
|
||||
uint32_t poseIndex = controller::TRACKED_OBJECT_00 + i;
|
||||
controller::Pose invalidPose;
|
||||
_poseStateMap[poseIndex] = invalidPose;
|
||||
}
|
||||
handleTrackedObject(i, inputCalibrationData);
|
||||
}
|
||||
|
||||
// handle haptics
|
||||
|
@ -177,6 +171,7 @@ void ViveControllerManager::InputDevice::handleTrackedObject(uint32_t deviceInde
|
|||
uint32_t poseIndex = controller::TRACKED_OBJECT_00 + deviceIndex;
|
||||
|
||||
if (_system->IsTrackedDeviceConnected(deviceIndex) &&
|
||||
_system->GetTrackedDeviceClass(deviceIndex) == vr::TrackedDeviceClass_GenericTracker &&
|
||||
_nextSimPoseData.vrPoses[deviceIndex].bPoseIsValid &&
|
||||
poseIndex <= controller::TRACKED_OBJECT_15) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue