Unity之XR Interaction Toolkit使用记录

环境

Unity版本:2021.3.45f2c1
Package:

  1. XR Interaction Toolkit 3.0.7,导入示例 Starter Assets
    XR Interaction Toolkit 当前版本没有升级选项,手动修改package.json文件,下载3.0.7版本
  2. xr plugin management 4.5.2
    勾选 initialize xr on startup,openxr,openxr 添加 profiles
  3. open xr plguin 1.13.2

问题

  1. 手柄射线短
    解决:CurveInteractionCaster设置 cast 距离
  2. 关闭左手柄移动
    解决:Locomotion Move 禁用Move组件 Dynamic Move Provider
  3. 模型特效不显示
    openxr render mode启用multi pass
  4. 模型无法点击
    xr 相机添加Tracked Device Physics Raycaster组件
    near-far interactor的曲线交互组件设置层级为everything
    注意:Collider不能勾选 isTrigger

体验

不需要自己实现射线与UI,射线与模型的交互,开发更加简便。