I’m having trouble getting XR Grab Interaction to work on a device that only has a “GripButton” (Binary) and not a “Grip” (Axis1D) feature (Vive Cosmos). It works with Trigger but not with “Grip” or “GripPressed”.
I think that it comes down to the device reporting the button name as “GripButton” while the code in “InputHelpers.cs” is using the name “GripPressed”.
Perhaps the name changed between versions and I’ve got a wrong version?
Anyone else run into this?
com.unity.xr.interaction.toolkit@0.9.4-preview\Runtime\XR\InputHelpers.cs
static ButtonInfo[ ] s_ButtonData = new ButtonInfo[ ]
{
new ButtonInfo(“”, ButtonReadType.None),
new ButtonInfo(“MenuButton”, ButtonReadType.Binary),
new ButtonInfo(“Trigger”, ButtonReadType.Axis1D),
new ButtonInfo(“Grip”, ButtonReadType.Axis1D),
new ButtonInfo(“TriggerPressed”, ButtonReadType.Binary),
new ButtonInfo(“GripPressed”, ButtonReadType.Binary),
new ButtonInfo(“PrimaryButton”, ButtonReadType.Binary),
new ButtonInfo(“PrimaryTouch”, ButtonReadType.Binary),
new ButtonInfo(“SecondaryButton”, ButtonReadType.Binary),
new ButtonInfo(“SecondaryTouch”, ButtonReadType.Binary),
new ButtonInfo(“Primary2DAxisTouch”, ButtonReadType.Binary),
new ButtonInfo(“Primary2DAxisClick”, ButtonReadType.Binary),
new ButtonInfo(“Secondary2DAxisTouch”, ButtonReadType.Binary),
new ButtonInfo(“Secondary2DAxisClick”, ButtonReadType.Binary),
new ButtonInfo(“Primary2DAxis”, ButtonReadType.Axis2DUp),
new ButtonInfo(“Primary2DAxis”, ButtonReadType.Axis2DDown),
new ButtonInfo(“Primary2DAxis”, ButtonReadType.Axis2DLeft),
new ButtonInfo(“Primary2DAxis”, ButtonReadType.Axis2DRight),
new ButtonInfo(“Secondary2DAxis”, ButtonReadType.Axis2DUp),
new ButtonInfo(“Secondary2DAxis”, ButtonReadType.Axis2DDown),
new ButtonInfo(“Secondary2DAxis”, ButtonReadType.Axis2DLeft),
new ButtonInfo(“Secondary2DAxis”, ButtonReadType.Axis2DRight),
};
Oculus Quest also reports a “GripButton” Binary feature and I can’t grab with that. But, since it has a “Grip” Axis1D feature as well, I can use that instead (and it works)