一、环境配置

1.File------>Build Settings------>Player Settings。

unity | VRTK初步配置
unity | VRTK初步配置

2.将Other Settings 下的Api Compatinility Level更改为.NET 4.x。

unity | VRTK初步配置

二、VRTK配置

1.unity2019需要手动添加openVR,在Window------>Package Manager------>OpenVR Desktop------>install。

unity | VRTK初步配置
unity | VRTK初步配置

2.导入VRTK和steamVR的包,然后将[VRTK_SDKManager]相机预制体拖入场景中。

unity | VRTK初步配置
unity | VRTK初步配置

3.新建空物体VRTK_Scripts,再在VRTK_Scripts下新建left和right。
将left和right添加到VRTK_SDKManager下Script Aliases下的Left Controller和Right Controller中。

unity | VRTK初步配置
unity | VRTK初步配置

4.给VRTK_Scripts下的left和right添加如下图的脚本。

unity | VRTK初步配置

5.分别将left和fight中的VRTK_BeaierPointerRend添加到VRTK_Pointer下的Pointer Renderer中。

unity | VRTK初步配置

6.添加空物体VRTK_Teleport,添加如下图所示内容,勾选需要的类型即可。

unity | VRTK初步配置

7.测试运行时需要勾选VRTK_SDKManager下的steam VR。

PS:unity 2018以上的版本才需要在项目中添加OpenVR,2017不需要。

相关文章:

  • 2021-07-14
  • 2021-07-30
  • 2021-12-25
  • 2021-11-13
  • 2021-09-28
  • 2021-12-10
  • 2021-11-17
  • 2021-11-15
猜你喜欢
  • 2021-08-22
  • 2021-09-02
  • 2022-12-23
  • 2021-04-11
  • 2021-12-17
  • 2021-05-13
  • 2021-08-29
相关资源
相似解决方案