Unity Leap Motion错误消息“输入轴未设置”

时间:2019-04-26 08:19:40

标签: unity3d virtual-reality leap-motion

我目前正在与Leap Motion,HTC Vive和Unity进行我的第一个VR项目。 当我创建一个新项目并添加LeapRig时,一切都很好,但是在将Interaction Manager添加为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)

有人知道为什么会发生这种情况以及如何解决吗? 我已经与交互管理器一起工作,但是突然出现了此错误消息。 我也可以很好地运行我的程序,但是无论如何错误都会困扰着我,并且使正确使用控制台变得困难。

来自德国的问候

马克

1 个答案:

答案 0 :(得分:0)

从交互引擎文档中:

  

如果您打算将Interaction Engine与Oculus Touch或Vive一起使用   控制器,您需要配置项目的输入设置   在使用控制器来抓取对象之前。输入项   设置是无法通过导入更改的项目设置   包,这就是为什么我们不能为这些配置配置这些输入设置的原因   您。如果您只对使用感兴趣,可以跳过此部分   与Interaction Engine互动。

     

转到输入管理器(编辑->项目设置->输入)并进行设置   向上用于左手和右手的操纵杆轴   掌握。 (控制器触发器在下文中仍称为“操纵杆”   Unity的说法。)然后确保每个InteractionXRController都有其   抓取轴设置为您设置的相应轴。默认值   左右InteractionXRControllers的预制件将寻找轴   分别命名为LeftXRTriggerAxis和RightXRTriggerAxis。

     

有用的图表和轴标签可以在Unity的   文档。