diff --git a/src/ControllerDevice.cpp b/src/ControllerDevice.cpp index 8fd9147..1d12c4c 100644 --- a/src/ControllerDevice.cpp +++ b/src/ControllerDevice.cpp @@ -136,6 +136,9 @@ vr::EVRInitError SlimeVRDriver::ControllerDevice::Activate(uint32_t unObjectId) void SlimeVRDriver::ControllerDevice::PositionMessage(messages::Position &position) { + if (this->device_index_ == vr::k_unTrackedDeviceIndexInvalid) + return; + // Setup pose for this frame auto pose = this->last_pose_; //send the new position and rotation from the pipe to the tracker object diff --git a/src/HMDDevice.cpp b/src/HMDDevice.cpp index 67a5245..a0e76c3 100644 --- a/src/HMDDevice.cpp +++ b/src/HMDDevice.cpp @@ -19,6 +19,9 @@ void SlimeVRDriver::HMDDevice::Update() void SlimeVRDriver::HMDDevice::PositionMessage(messages::Position &position) { + if (this->device_index_ == vr::k_unTrackedDeviceIndexInvalid) + return; + // Setup pose for this frame auto pose = this->last_pose_; //send the new position and rotation from the pipe to the tracker object diff --git a/src/TrackerDevice.cpp b/src/TrackerDevice.cpp index 9ad99da..d1e7f4a 100644 --- a/src/TrackerDevice.cpp +++ b/src/TrackerDevice.cpp @@ -44,6 +44,9 @@ void SlimeVRDriver::TrackerDevice::Update() void SlimeVRDriver::TrackerDevice::PositionMessage(messages::Position &position) { + if (this->device_index_ == vr::k_unTrackedDeviceIndexInvalid) + return; + // Setup pose for this frame auto pose = this->last_pose_; //send the new position and rotation from the pipe to the tracker object diff --git a/src/TrackingReferenceDevice.cpp b/src/TrackingReferenceDevice.cpp index 672cec2..90a5add 100644 --- a/src/TrackingReferenceDevice.cpp +++ b/src/TrackingReferenceDevice.cpp @@ -88,6 +88,9 @@ vr::DriverPose_t SlimeVRDriver::TrackingReferenceDevice::GetPose() void SlimeVRDriver::TrackingReferenceDevice::PositionMessage(messages::Position &position) { + if (this->device_index_ == vr::k_unTrackedDeviceIndexInvalid) + return; + // Setup pose for this frame auto pose = this->last_pose_; //send the new position and rotation from the pipe to the tracker object