Showing the changes to libraries/input-plugins/src/input-plugins/ViveControllerManager.cpp (1 of 20 files). Show all
Unified · Split
| @@ -186,7 +186,8 @@ void ViveControllerManager::renderHand(UserInputMapper::PoseValue pose, gpu::Bat · 185 unmodified lines | ||
| 186 | 186 | batch.drawIndexed(gpu::TRIANGLES, mesh->getNumIndices(), 0); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | −void ViveControllerManager::update(float deltaTime) { | |
| 189 | +void ViveControllerManager::update(float deltaTime, bool jointsCaptured) { | |
| 190 | + _poseStateMap.clear(); | |
| 190 | 191 | // TODO: This shouldn't be necessary |
| 191 | 192 | if (!_hmd) { |
| 192 | 193 | return; |
| @@ -216,8 +217,10 @@ void ViveControllerManager::update(float deltaTime) { · 23 unmodified lines | ||
| 216 | 217 | numTrackedControllers++; |
| 217 | 218 | |
| 218 | 219 | const mat4& mat = _trackedDevicePoseMat4[device]; |
| 219 | − | |
| 220 | − handlePoseEvent(mat, numTrackedControllers - 1); | |
| 220 | + | |
| 221 | + if (!jointsCaptured) { | |
| 222 | + handlePoseEvent(mat, numTrackedControllers - 1); | |
| 223 | + } | |
| 221 | 224 | |
| 222 | 225 | // handle inputs |
| 223 | 226 | vr::VRControllerState_t controllerState = vr::VRControllerState_t(); |