ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.03k stars 255 forks source link

How to get “VIVE controller is not currently tracking” status? #799

Open lulu-sk opened 4 years ago

lulu-sk commented 4 years ago

The controller sometimes fails to track and affects the game experience. How do I get the tracking loss status of (helmet\controller\tracker)

lulu-sk commented 4 years ago

The main purpose is to solve the problem of helmet shake

zite commented 4 years ago

For Controllers you can subscribe to the poseAction[hand].onTrackingChanged event of the pose action. Or you can just poll the poseAction[hand].trackingState. For the hmd it's a little more tricky. Are you using Unity 2020.1 (Unity XR) or earlier?

lulu-sk commented 4 years ago

For Controllers you can subscribe to the poseAction[hand].onTrackingChanged event of the pose action. Or you can just poll the poseAction[hand].trackingState. For the hmd it's a little more tricky. Are you using Unity 2020.1 (Unity XR) or earlier?

Thank you for your reply After yesterday's efforts, I got the state of the helmet (running, calibration, out of range) through SteamVR.cs, and also got the state of other controllers through onTrackingChanged I can seemingly solve the displacement problem caused by controller loss by detecting whether this state of being "in motion" allows the controller to move within the game space But I still have a problem. My reality: The handle is next to my helmet Virtual world in Unity Engine: Camera quivers Cause analysis: It may be because the handle is blocking the helmet's positioning system, causing jitter This issue has seriously affected my virtual experience, and I would like to check whether the "running" state allows movement within the game space However, when the signal is bad and the connection is not disconnected, the helmet is in a normal state, which makes it impossible for me to solve the wobble problem of the helmet through the "three states"