Forum Discussion
KrwawyTom
2 years agoExplorer
Battery percent remaining always returns 0%
After the update to branch ue4.27 v57 the function GetControllerState always returns 0%. I was trying to use GetControllerState6 as well as GetControllerState4 which I used earlier.
GetControllerState6 returns a successful result.
I have tested it on both quest2 and quest3.
Am I doing something wrong?
mt code
bool UOculusFunctionLibrary::GetControllersBatteryLevel(int& OutLeftController, int& OutRightController)
{
#if OCULUS_HMD_SUPPORTED_PLATFORMS
ovrpControllerState6 ControllerState;
if (OVRP_SUCCESS(FOculusHMDModule::GetPluginWrapper().GetControllerState6(ovrpController_Touch, &ControllerState)))
{
OutLeftController = ControllerState.BatteryPercentRemaining[0];
OutRightController = ControllerState.BatteryPercentRemaining[1];
return true;
}
#endif
return false;
}
Replies have been turned off for this discussion
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
- 3 months ago
- 2 years ago
- 2 years ago
- 3 years ago