CloudXR4.0 What's the optional controllerName of cxrControllerDesc

In the version3.2, ControllerType is optional to

typedef enum
{
    cxrControllerType_HtcVive,
    cxrControllerType_ValveIndex,
    cxrControllerType_OculusTouch,
    cxrControllerType_None
} cxrControllerType;

In the version 4.0, The document says [ An identifying product name for the controller. This is used to determine the server rendering of the controller, and may be used for other features.] But not mention about options for the name.
I’ve tried “Valve Index” or “ValveIndex” or “ValveIndexController”, the controller is recognized as HTCVive in the steamVR. What’s the proper name for ValveIndex controller?

Previous post was deleted as I now believe it to be wrong. I’m actively investigating, will have an answer shortly.

Okay, got a status.

I think there is a bug in the Windows sample client code. In ClientOpenVR.cpp, a list of human readable names is declared:

    static const char* controllerNames[] =
    {
        "HTC Vive Wand",
        "Valve Index Controller",
        "Oculus Touch Controller", 
        "None",
    };

This is used to set the controller description name:

                desc.controllerName = controllerNames[int(type)];

and, backing it through some code, the “type” used in that line is set by checking the OpenVR string name.

On the server side, we compare to the OpenVR string name, not the list of constants as declared in this file. You can update that list to this and it should work (though I have not tested it):

    static const char* controllerNames[] =
    {
        "HTC",
        "Index",
        "Oculus Touch", 
        "None",
    };

Note that HTC is the “fallback” choice on the server, which is why unrecognized things show up as that.

Thanks. The name “Index” works.

Excellent! Glad that fixed it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.