Unity HTC使用ViveTelport插件插件实现瞬移

1.导入SteamVR和Vive-Teleporter到Unity

2.按下图拖入需要的预制体

Unity HTC使用ViveTelport插件插件实现瞬移

设置Pointer

Unity HTC使用ViveTelport插件插件实现瞬移

3.为Camera (eye)添加TeleportVive组件 设置如下

Unity HTC使用ViveTelport插件插件实现瞬移

4.烘焙场景

先设置可移动范围内的地面障碍物等设置为static

然后Window->Navigation->Bake

以上就可以实现瞬移

下面为代码部分,修改功能

Unity HTC使用ViveTelport插件插件实现瞬移

Unity HTC使用ViveTelport插件插件实现瞬移