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/
There is no occurrence of "battery" word in the sdk folder and the ovrTrackingState::HandPoses
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 Oculus Utilities 1.31 and 1.40
Oculus SDK 1.40