Forum Discussion
Anonymous
7 years agoHow to get Oculus Rift/Rift S touch controllers battery level?
Hello,
I urgently need to access to touch controllers battery level from Unity, i know it's available somewhere because we can see the battery level in the Oculus Software, but I tried several ways and no method works:
1) In Unity, use Oculus Utilities asset's OVRInput.GetControllerBatteryPercentRemaining() method:
It returns 0 and the method's summary says "Retuns the battery percentage remaining for the specified controller. Values range from 0 to 100. Only applicable to controllers that report battery level, such as the GearVR Controller. Returns 0 for controllers that do not report battery level" so i concluded that Touch Controllers don't report battery level to OVRInput.
This person has the same problem : https://forums.oculusvr.com/developer/discussion/69979/oculus-go-get-controller-battery-level and Oculus given no answer.
2) In Unity, use the OpenVR.System.GetFloatTrackedDeviceProperty() method as it's adviced here: https://answers.unity.com/questions/1478339/get-vive-oculus-touch-battery-status.html
The method returns a TrackedProp_UnknownProperty error for each controller device id.
3) Search in Oculus SDK (https://developer.oculus.com/downloads/package/oculus-sdk-for-windows/) methods:
There is no occurrence of "battery" word in the sdk folder and the ovrTrackingState::HandPoses and ovrInputState objects only provides position/orientation/velocity/accelerations/buttonPress informations.
This person has the same problem (https://forums.oculusvr.com/developer/discussion/78140/get-controller-battery-level-for-oculus-rift-s-in-net) and Oculus given no answer.
Anyone has found a solution for this problem?
Software versions used:
Unity 2019.2.7f2
Unity Oculus Utilities 1.31 and 1.40
Oculus SDK 1.40
I urgently need to access to touch controllers battery level from Unity, i know it's available somewhere because we can see the battery level in the Oculus Software, but I tried several ways and no method works:
1) In Unity, use Oculus Utilities asset's OVRInput.GetControllerBatteryPercentRemaining() method:
It returns 0 and the method's summary says "Retuns the battery percentage remaining for the specified controller. Values range from 0 to 100. Only applicable to controllers that report battery level, such as the GearVR Controller. Returns 0 for controllers that do not report battery level" so i concluded that Touch Controllers don't report battery level to OVRInput.
This person has the same problem : https://forums.oculusvr.com/developer/discussion/69979/oculus-go-get-controller-battery-level and Oculus given no answer.
2) In Unity, use the OpenVR.System.GetFloatTrackedDeviceProperty() method as it's adviced here: https://answers.unity.com/questions/1478339/get-vive-oculus-touch-battery-status.html
The method returns a TrackedProp_UnknownProperty error for each controller device id.
3) Search in Oculus SDK (https://developer.oculus.com/downloads/package/oculus-sdk-for-windows/) methods:
There is no occurrence of "battery" word in the sdk folder and the ovrTrackingState::HandPoses and ovrInputState objects only provides position/orientation/velocity/accelerations/buttonPress informations.
This person has the same problem (https://forums.oculusvr.com/developer/discussion/78140/get-controller-battery-level-for-oculus-rift-s-in-net) and Oculus given no answer.
Anyone has found a solution for this problem?
Software versions used:
Unity 2019.2.7f2
Unity Oculus Utilities 1.31 and 1.40
Oculus SDK 1.40
2 Replies
- Aliaksei.LuferauExplorer
Hello Anonymous Did you resolve controllers battery level access issue? Thanks!
- CiberspyExplorer
Just because it's accessible to the built in software does not mean they are gonna expose it for your own use.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 5 months ago
- 2 months ago
- 3 years ago