Oculus Quest Controllers Battery Levels

Hello everybody,

I am struggling for a bit to find a way to get the battery levels of the controllers (maybe even the headset) on Oculus Quest/Quest 2. I can’t seem to find any link to battery percentages in the Oculus Plugin. I am using Unreal 4.22.3 with the latest plugins from Oculus. Also to mention that I want to track the battery levels when connected via Oculus Link. Any advice or help would be much appreciated.

Best regards, Alex.

Not sure if you can get this from Blueprints, but from C++ the OVRPlugin header file contains these functions which should give you access to what you want:

/// Gets the status of the system's battery or "Unknown" if there is none.
OVRP_EXPORT ovrpResult ovrp_GetSystemBatteryStatus2(ovrpBatteryStatus* systemBatteryStatus);

/// Gets the current available battery charge, ranging from 0 (empty) to 1 (full).
OVRP_EXPORT ovrpResult ovrp_GetSystemBatteryLevel2(float* systemBatteryLevel);

Hope this helps,

Sorry, that’s system battery only. The controller battery state can be read from the ovrpControllerState4 structure received from GetControllerState4.

/// Gets the controller state for the given controllers.
OVRP_EXPORT ovrpResult ovrp_GetControllerState4(ovrpController controllerMask, ovrpControllerState4* controllerState);

/// Describes Input State for use with Gamepads and Oculus Controllers.
typedef struct {
    unsigned int ConnectedControllerTypes;
    unsigned int Buttons;
    unsigned int Touches;
    unsigned int NearTouches;
    float IndexTrigger[2];
    float HandTrigger[2];
    ovrpVector2f Thumbstick[2];
    ovrpVector2f Touchpad[2];
    unsigned char BatteryPercentRemaining[2];
    unsigned char RecenterCount[2];
    unsigned char Reserved[28];
} ovrpControllerState4;

That is perfect .Thank you very much for the replay.

Best regards, Alex.

Hi ! I was trying to get the battery level of my quest 2, and I found this thread, the two functions that Hyperlogic shared on the first reply seem to be a perfect match for my needs, but I am having a hard time figuring out how they must be use. Is there a way to have something like :

headsetBattery = ovrp_GetSystemBatteryLevel2(systemBatteryLevel);

I would appreciate any tips or advice : )

Kind regards, Ben.