Hi2,
有人知道如何通过统一中的代码在steamVR控制器上输入C#菜单按钮吗?
目前,我能够从触发器,触控板和抓地力按钮获得输入。
private void Update()
{
if (SteamVR_Input._default.inActions.GrabGrip.GetStateDown(inputSource))
Debug.Log("grab grip"); // the side button on the controller
if (SteamVR_Input._default.inActions.GrabPinch.GetStateDown(inputSource))
Debug.Log("grab pinch"); // the back button on the controller
if (SteamVR_Input._default.inActions.Teleport.GetStateDown(inputSource))
Debug.Log("teleport"); // the big middle button on the controller
}

任何帮助都是非常感谢的。^_^
发布于 2019-08-18 16:02:19
在菜单‘窗口-> SteamVR输入’中选择。从那里点击‘开放绑定UI’。浏览器将打开一个屏幕,您可以在其中看到以下内容:

红色箭头指向可以为菜单按钮添加操作的位置(对不起,我的是德语)。将其称为“MenuClick”,并确保将其保存在您的私人设置中。然后,在您的代码中访问它
if (SteamVR_Input._default.inActions.MenuClick.GetStateDown(inputSource))
Debug.Log("menu button pressed"); // the menu button on the controllerhttps://stackoverflow.com/questions/56429464
复制相似问题