unity3d - Unity Leap Motion 错误消息“输入轴未设置”
问题描述
我目前正在使用 Leap Motion、HTC Vive 和 Unity 进行我的第一个 VR 项目。当我创建一个新项目并添加 LeapRig 时,一切都很好,但是在将交互管理器添加为 LeapRig 的子项后,我收到以下错误消息,该消息每秒重复多次:
INPUT AXIS NOT SET UP. Go to your Input Manager and add a definition for on the 9th Joystick Axis.
UnityEngine.Debug:LogError(Object)
Leap.Unity.Interaction.InteractionXRController:fixedUpdateGraspButtonState(Boolean) (at Assets/LeapMotion/Modules/InteractionEngine/Scripts/InteractionXRController.cs:733)
Leap.Unity.Interaction.InteractionXRController:fixedUpdateGraspingState() (at Assets/LeapMotion/Modules/InteractionEngine/Scripts/InteractionXRController.cs:706)
Leap.Unity.Interaction.InteractionController:fixedUpdateGrasping() (at Assets/LeapMotion/Modules/InteractionEngine/Scripts/InteractionController.cs:1783)
Leap.Unity.Interaction.InteractionController:Leap.Unity.Interaction.IInternalInteractionController.FixedUpdateController() (at Assets/LeapMotion/Modules/InteractionEngine/Scripts/InteractionController.cs:259)
Leap.Unity.Interaction.InteractionManager:fixedUpdateInteractionControllers() (at Assets/LeapMotion/Modules/InteractionEngine/Scripts/InteractionManager.cs:372)
Leap.Unity.Interaction.InteractionManager:FixedUpdate() (at Assets/LeapMotion/Modules/InteractionEngine/Scripts/InteractionManager.cs:299)
有谁知道为什么会发生这种情况以及如何解决它?我已经与交互管理器合作过,但突然出现此错误消息。我也可以很好地运行我的程序,但是这个错误仍然困扰着我,并且很难正确使用控制台。
来自德国的问候
马克
解决方案
来自交互引擎文档:
如果您打算将交互引擎与 Oculus Touch 或 Vive 控制器一起使用,则需要先配置项目的输入设置,然后才能使用控制器抓取对象。输入设置是无法通过导入的包更改的项目设置,这就是我们无法为您配置这些输入设置的原因。如果您只对使用 Leap 手和交互引擎感兴趣,可以跳过本节。
转到您的输入管理器(编辑 -> 项目设置 -> 输入)并设置您想要用于左手和右手抓握的操纵杆轴。(控制器触发器在 Unity 中仍称为“操纵杆”。)然后确保每个 InteractionXRController 的抓取轴设置为您设置的相应轴。左右 InteractionXRControllers 的默认预制件将分别查找名为 LeftXRTriggerAxis 和 RightXRTriggerAxis 的轴。
有用的图表和轴标签可以在 Unity 的文档中找到。
推荐阅读
- python-3.x - 在python中将字符串转换为元组
- c# - 如何使用配置与 ValidateDataAnnotations
- artificial-intelligence - 如何在 RASA NLU 中定义意图独立的实体?
- angular - 如何将 LoginServlet 链接到 Angular?
- python - 在烧瓶助手上获取用户消息
- sql-server - 多个嵌套内连接:并非所有记录都显示
- react-native - 我可以使用 React Native 将样式应用于用户输入中的文本子集吗?
- jquery - Select2 在预设标签元素上启用编辑/键入
- python - 如何从 keras/tensorflow 中的顺序模型中获取 logits?
- anychart - 为父组分隔符设置全宽行颜色