• [UE4]添加手柄


    一、在上一节的VRPawnBase中,再添加2个Motion Controller,分别命名为:LeftMotionController、RightMotionController,分别代表左右手柄。

        

      设置Motion Controller的Hand属性,表示左右手柄:LeftMotionController.Hand=Left、RightMotionController.Hand=Right。

      

    二、MotionController只是一个控制器,没有实体,分别选中LeftMotionController和RightMotionController添加一个Mesh(Static Mesh、Skeletal Mesh、ChildActor都可以,本例使用Static Mesh)作为子节点,分别命名为:LeftHandMesh、RightHandMesh。

       

     三、设置LeftHandMesh.Static Mesh = VivePreControllerMesh,RightHandMesh.Static Mesh = VivePreControllerMesh。

      

      VivePreControllerMesh是引擎自带的一个手柄模型,如果没有找到,则勾选View Options.Show Engine Content(显示引擎资源),就能找到VivePreControllerMesh了。

      

     四、运行游戏,在现实中拿着左右2个手柄左右晃动,可以看到游戏场景里面的手柄也会跟着左右晃动。把现实中的2个手柄放在地上,如果游戏场景里面的手柄也跟着放在地上,则表示高度设置没问题。  

      

      如果高度不正确的话,检查VRPawnBase里面的相机是否有位置偏移。

      

      

  • 相关阅读:
    正交实验
    边界值
    等价类划分概述
    测试用例编写
    java基础复习(四)
    easyui datagrid 搜索功能
    一段代码把网站变成灰白色
    PHP 获取二维数组中某个key的集合
    如何使用Mobile_Detect来判断访问网站的设备:安卓,平板,电脑
    easyui validatebox 验证类型
  • 原文地址:https://www.cnblogs.com/timy/p/10333460.html
Copyright © 2020-2023  润新知