《SteamVR2.2.0开发指南》(Yanlz+Unity+XR+SteamVR+OpenXR+OpenVR+Valve+VIVE+Oculus+Interaction+VR+立钻哥哥++ok++)

《SteamVR2.2.0开发指南》

《SteamVR2.2.0开发指南》

版本html

做者ios

参与者git

完成日期github

备注面试

SteamVR2.2.0_Guide_V01_1.0算法

严立钻数据库

 

2019.03.22编程

 

 

 

 

 

 

 

 

##《SteamVR2.2.0开发指南》发布说明:json

++++“SteamVR2.2.0开发指南”:是对“SteamVR2.2.0”的入门指导;(2019年度的重点技术突破点确立为:“SteamVR”)(前面已经有了一个“V2.0”开发指南了:http://www.javashuo.com/article/p-wgdghzsl-er.html,可是SteamVR更新到了V2.2.0,感受是一个大版本,好吧,那就再补充一篇:V2.2.0)canvas

++++“SteamVR2.2.0开发指南”:定位在熟悉SteamVR框架

 

++++OpenVR的Github:https://github.com/ValveSoftware/openvr

++++OpenXR官网:https://www.khronos.org/openxr

++++SteamVR的Github:https://github.com/ValveSoftware/steamvr_unity_plugin

++++SteamVR的Releases:https://github.com/ValveSoftware/steamvr_unity_plugin/releases

++++SteamVR2.2.0开发指南http://www.javashuo.com/article/p-hguaxolf-ew.html

++++SteamVR2.2.0快速入门http://www.javashuo.com/article/p-fcmbsvpm-gb.html

++++SteamVR2.2.0交互系统http://www.javashuo.com/article/p-ocssrxuq-gd.html

++++SteamVR2.2.0传送机制http://www.javashuo.com/article/p-ophuaicg-gh.html

++++SteamVR2.2.0官方教程http://www.javashuo.com/article/p-gblmlsya-gp.html

 

 

##《SteamVR2.2.0开发指南》目录

#第一篇:SteamVR2.2.0概述

#第二篇:v2.2.0的Documentation技术资料

#第三篇:v2.2.0交互系统案例

#第四篇:v2.2.0框架结构

#第五篇:立钻哥哥对SteamVR的拓展

推广:【XR游戏开发QQ群:784477094

 

 

 

 

#第一篇:SteamVR2.2.0概述

#第一篇:SteamVR2.2.0概述

#第一篇:SteamVR2.2.0概述

++++立钻哥哥:开始SteamVR2.2.0的学习了,有什么感想呢?

++++SteamVR2.0开发指南:http://www.javashuo.com/article/p-wgdghzsl-er.html

++++上面的连接是关于“SteamVR2.0”介绍的,能够先看一下;

 

++++A.一、V2.2.0前言

++++A.二、V2.2.0版本说明

++++A.三、立钻哥哥对SteamVR的理解拓展

 

 

 

##A.一、V2.2.0前言

##A.一、V2.2.0前言

++A.一、V2.2.0前言

++++立钻哥哥:  SteamVR Unity PluginUnity中使用的SteamVR插件

++++ATTN:When upgrading from an older version, it is best to first delete the SteamVR folder in your project, and then import the package. Youll also want to regenerate actions from the SteamVR Input window.立钻哥哥:从旧版本升级时,最好首先删除您项目中的SteamVR文件夹,而后导入包。您还须要从SteamVR Input窗口从新生成操做。

 

 

++SteamVR Unity Plugin

++++立钻哥哥:https://github.com/ValveSoftware/steamvr_unity_plugin

++++[SteamVR技术资料]:https://valvesoftware.github.io/steamvr_unity_plugin/

++++[介绍]:Valve maintains this Unity plugin to smoothly interface with SteamVR. With SteamVR developers can target one API that all the popular PC VR headsets can connect to. The modern SteamVR Unity Plugin manages three main things for developers: loading 3d models for VR controllers, handling input from those controllers, and estimating what your hand looks like while using those controllers. On top of managing those things we have an Interaction System example to help get your VR application off the ground. Providing concrete examples of interacting with the virtual world and our APIs.立钻哥哥:Valve维护了这个Unity插件,以便与SteamVR顺畅地交互。使用SteamVR,开发者能够针对全部流行的PC VR头盔均可以链接的一个API。新版本的[SteamVR Unity Plugin]为开发者管理了三件主要的事情:为VR控制器加载3d模型,处理来自这些控制器的输入,以及在使用这些控制器时估计你的手的样子。在管理这些事情之上,咱们有一个交互系统示例来帮助您的VR应用程序。提供与虚拟世界和咱们的api交互的具体示例。

 

 

++Requirements(V2.2.0)

++++立钻哥哥:This version of the SteamVR Unity Plugin is compatible and has been tested with Unity versions 5.4 - 2019.1。这个版本的SteamVR Unity插件是兼容的,而且已经经过Unity版本5.4 - 2019.1进行了测试。

++++The SteamVR runtime must be installed. This can be downloaded from Steam under the Tools category. Or by clicking herehttps://store.steampowered.com/app/250820/SteamVR/. As developers we strongly recommend that you opt-in to SteamVR beta so you can test new features and verify your application works with the latest versions of SteamVR.立钻哥哥:必须安装SteamVR运行时。这能够从Steam官网的工具中下载。或点击这里(https://store.steampowered.com/app/250820/SteamVR/)。做为开发人员,咱们强烈建议您选择SteamVR beta版,这样您就能够测试新特性,并验证您的应用程序是否可使用最新版本的SteamVR。

 

++Documentation

++++立钻哥哥:Documentation can be found online here: https://valvesoftware.github.io/steamvr_unity_plugin/.(立钻哥哥:文档能够在这里找到: https://valvesoftware.github.io/steamvr_unity_plugin/

 

 

++Quick Start

++++立钻哥哥:快速上手作VR,能够参考插件提供的一个例子“Interaction System(交互系统)”,这个也是下一个重要的剖析点,这个会另外出一篇或者一系列博文来剖析这些案例的,敬请期待!

++++SteamVR学习系列:https://blog.csdn.net/vrunsoftyanlz/article/category/8582642

++++SteamVR2.0开发指南http://www.javashuo.com/article/p-wgdghzsl-er.html

++++SteamVR2.2.0开发指南http://www.javashuo.com/article/p-hguaxolf-ew.html

++++SteamVR2.2.0快速入门http://www.javashuo.com/article/p-fcmbsvpm-gb.html

++++Follow the Quickstart guide on this site: https://valvesoftware.github.io/steamvr_unity_plugin/articles/Quickstart.html.(立钻哥哥:这个网站上的有一个快速入门指南:https://valvesoftware.github.io/steamvr_unity_plugin/articles/Quickstart.html。

 

++++If you want to explore the Interaction System scene youll need to open the SteamVR Input window(under the Window Menu), click yes to copy example jsons, then click Save and Generate to create input actions.立钻哥哥:若是您想探索“交互系统”场景,您须要打开SteamVR输入窗口(在窗口菜单下),单击yes复制示例jsons,而后单击Save和Generate建立输入操做。

 

++++For the most simple example of VR with tracked controllers see the sample scene at /SteamVR/Simple Sample.立钻哥哥:关于带有跟踪控制器的VR的最简单示例,请参见/SteamVR/ simple sample中的示例场景。

 

++++For a more extensive example including picking up, throwing objects, and animated hands see the Interaction System example at /SteamVR/Interaction System/Samples/Interactions_Example. 立钻哥哥:有关更普遍的示例,包括拾起、投掷对象和动画手,请参见/SteamVR/Interaction System/Samples/Interactions_Example中的“交互系统”示例。

 

 

++Support

++++立钻哥哥:这里咱们必需要面对的是一堆英文技术资料,不过如今有不少在线翻译软件,能够解决这些问题,我这里用的是“有道词典”;因此“英语”和“数学”是很是重要的,“语文”也很重要

++++If youre having trouble with the plugin the best place to discuss issues is our github here: https://github.com/ValveSoftware/steamvr_unity_plugin/issues/.(立钻哥哥:若是你对这个插件有问题,最好的讨论地点是咱们的github: https://github.com/ValveSoftware/steamvr_unity_plugin/issues/

 

++++If youd like to discuss features, post guides, and give general feedback please post on the steam forum here: https://steamcommunity.com/app/250820/discussions/7/.(立钻哥哥:若是您想讨论特性、发布指南并给出通常反馈,请在steam论坛上发布:https://steamcommunity.com/app/250820/discussions/7/)(Tips:这个论坛估计得翻墙,各位小伙伴,翻墙注意安全,别脚滑了,摔倒哈!

 

 

 

 

 

##A.二、V2.2.0版本说明

##A.二、V2.2.0版本说明

++A.二、V2.2.0版本说明

++++立钻哥哥:https://github.com/ValveSoftware/steamvr_unity_plugin/releases

++++If you are upgrading your project from 1.2.3 you will need to rewrite your input layer. See the new documentation site here: https://valvesoftware.github.io/steamvr_unity_plugin/ for more information. If you dont want to do that then do not upgrade to this version.立钻哥哥:若是要从1.2.3升级项目,则须要重写输入层。参见这里的新文档站点获取更多信息:https://valvesoftware.github.io/steamvr_unity_plugin/。若是您不想这样作,那么不要升级到这个版本。

++++If you are upgrading from 2.0.1 you will need to delete your SteamVR folder, Save and Generate, and then re-set your actions that youve assigned in the editor. You do not need to recreate your actions file or bindings files. This was necessary to support Unitys new serialization in 2018/2019. 立钻哥哥:若是您正在从2.0.1升级,您将须要删除您的SteamVR文件夹,保存并生成,而后从新设置您在编辑器中分配的操做。您不须要从新建立操做文件或绑定文件。这对于支持Unity在2018/2019年的新系列是必要的。

 

 

++Changes for v2.2.0

++++立钻哥哥:删除一些未使用代码;这个是代码整理的过程,一个比较好的习惯

++++Removing some unused code.删除一些未使用的代码。)

 

++Changes for v2.2RC5

++++立钻哥哥:修正了控制器不支持框架输入(WinMR);修正了SteamVR有时会在编辑器中为SteamVR输入项目加载遗留绑定的问题

++++Fix for controllers that dont support Skeleton Input yet(WinMR).立钻哥哥:修正了控制器不支持框架输入(WinMR)。

++++Fixing issue where sometimes SteamVR would load legacy bindings for SteamVR Input projects while in the editor.立钻哥哥:修正了SteamVR有时会在编辑器中为SteamVR输入项目加载遗留绑定的问题。

 

++Changes for v2.2RC4

++++立钻哥哥:改变SteamVR_Input.isStartupFrame返回true,用于启动先后的几帧,这将暂时修复一些启动错误,直到咱们有一个SteamVR API来肯定启动状态;修正了构建失败的问题;显著下降了资源包文件大小(约50%),部分psdpng取代,部分png分辨率下降,旧的资源仍然在旧插件版本的github repo上;使Unity 2018.1+OpenVR包检测安装更加健壮;改进了使用Oculus头盔时的项目设置体验;

++++Changed SteamVR_Input.isStartupFrame to return true for the couple frames around startup. This fixes some startup errors temporarily until we have a SteamVR API to determine startup state.立钻哥哥:改变SteamVR_Input.isStartupFrame返回true,用于启动先后的几帧。这将暂时修复一些启动错误,直到咱们有一个SteamVR API来肯定启动状态。

++++Fixed an issue where builds would fail.立钻哥哥:修正了构建失败的问题.

++++Significantly reduced asset package file size(~50%). Some psds were replaced with pngs, some png res was lowered. The old assets are still on the github repo under old plugin versions.立钻哥哥:显著下降了资源包文件大小(约50%)。部分psd被png取代,部分png分辨率下降。旧的资源仍然在旧插件版本的github repo上

++++Made Unity 2018.1+ OpenVR package detection and installation more robust.立钻哥哥:使Unity 2018.1+ OpenVR包检测安装更加健壮。

++++Improved Project Setup experience when using an Oculus headset.立钻哥哥:改进了使用Oculus头盔时的项目设置体验。

 

++Changes for v2.2RC3

++++立钻哥哥:修改SteamVR_Behaviour_ActionType事件错误地发送了操做,而不是它们来自的行为组件;修改将handFollowTransform成员简化为一个变量,而不是三个变量;修正了一些Unity版本中从序列化对象中消失的行为事件;向SteamVR_Behaviour_Skeleton添加了一些事件;向SteamVR_Behaviour_Skeleton添加了一些事件;向SteamVR_Behaviour_ActionType组件添加C#样式事件;添加了快乐球做为一个复杂的混合姿态的例子,移动被持有的对象;增长了对骨骼poser的缩放支持;清除交互系统示例场景中的画布元素;骨骼姿式如今能够快速/跟随互动性;修改正几个小的场景组件上的命名空间;当点击“show binding UI”按钮时,咱们如今老是试图启动默认浏览器,尽管有时会失败,但如今咱们有了更好的错误消息;修正了一些文档错误;改进了骨骼poser编辑器UI;修正了actionSet没有序列化默认属性的问题

++++Minor Breaking Change: SteamVR_Behaviour_ActionType events were incorrectly sending the action instead of the behaviour component they came from.立钻哥哥:小更改:SteamVR_Behaviour_ActionType事件错误地发送了操做,而不是它们来自的行为组件。

++++Minor Breaking Change: Simplified the handFollowTransform member to be one variable instead of three.立钻哥哥:小更改:将handFollowTransform成员简化为一个变量,而不是三个变量。

++++Fixed code generation so it deletes unused actionset classes(asks first).立钻哥哥:固定的代码生成,所以它删除未使用的actionset类(首先询问)。

++++Fixed behaviour events disappearing from serialized objects in some unity versions.立钻哥哥:修正了一些unity版本中从序列化对象中消失的行为事件。

++++Added a few events to SteamVR_Behaviour_Skeleton.立钻哥哥:向SteamVR_Behaviour_Skeleton添加了一些事件。

++++Added C# style events to the SteamVR_Behaviour_ActionType components.立钻哥哥:向SteamVR_Behaviour_ActionType组件添加c#样式事件。

++++Added Happy Ball as an example of a complex blending pose that moves the held object.立钻哥哥:添加了快乐球做为一个复杂的混合姿态的例子,移动被持有的对象。

++++Added scaling support for the skeleton poser.立钻哥哥:增长了对骨架poser的缩放支持.

++++Cleaned up the canvas elements on the Interaction System Sample scene.立钻哥哥:清除交互系统示例场景中的画布元素。

++++Skeleton poser is now able to snap/follow interactables.立钻哥哥:骨骼姿式如今能够快速/跟随互动性。

++++Fixed the namespace on a couple small sample scene components.立钻哥哥:修正了几个小的场景组件上的命名空间。

++++When clicking the Show binding UI button we will now always try to launch the default browser, though it may fail sometimes(Edge) we have better error messages now.立钻哥哥:当点击“显示绑定UI”按钮时,咱们如今老是试图启动默认浏览器,尽管有时会失败(Edge),但如今咱们有了更好的错误消息。

++++Fixed some documentation errors.立钻哥哥:修正了一些文档错误.

++++Improved skeleton poser editor ui.立钻哥哥:改进的骨骼poser编辑器ui

++++Fixed an issue with ActionSets not serializing defaults property.立钻哥哥:修正了actionset没有序列化默认属性的问题.

 

++Changes for v2.2RC2

++++立钻哥哥:如今Interactable.isHovering正确报告悬停时,一只手在它上面,有一个新的关联字段Interactable.hoveringHand;渲染模型不该该在当即从新加载时抛出错误;将SteamVR_Behaviour组件添加到“交互系统”中的“Player”预置中,这样就更容易设置它的DoNotDestroy值;修正了骨骼控制被过早的召唤的问题,初始操做更新如今发生在SteamVR_Input初始化以后的帧中;在“Interaction System”示例场景中,规范化可抛物体的行为,使其按照描述所作的操做;修正了场景中没有传送组件时传送区域抛出错误的问题

++++Interactable.isHovering now correctly reports hovering when a hand is over it. There is a new associated field Interactable.hoveringHand.立钻哥哥:如今Interactable.isHovering 正确报告悬停时,一只手在它上面。有一个新的关联字段 Interactable.hoveringHand.

++++RenderModels should no longer throw an error on immediate reload.立钻哥哥:渲染模型不该该在当即从新加载时抛出错误。

+++Added the SteamVR_Behaviour component to the Player prefab in the Interaction System so its easier to set its DoNotDestroy value.立钻哥哥:SteamVR_Behavior组件添加到“交互系统”中的“Player”预置中,这样就更容易设置它的DoNotDestroy值。

++++Fixed an issue with skeletons complaining that they were getting called too early. Initial action updates now happen a frame after SteamVR_Input initialization.立钻哥哥:修正了骨骼控制被过早的召唤的问题。初始操做更新如今发生在SteamVR_Input初始化以后的帧中。

++++Normalized the behaviours of the throwables in the Interaction System sample scene to do what their description says they should.立钻哥哥:在“交互系统”示例场景中,规范化可抛物体的行为,使其按照描述所作的操做。

++++Fixed an issue with TeleportArea throwing errors without a Teleport component in the scene.立钻哥哥:修正了场景中没有传送组件时传送区域抛出错误的问题。

 

++Changes for v2.2RC1

++++立钻哥哥:增长了SteamVR_Skeleton_Poser组件,简化了建立姿态,很容易与“SteamVR骨骼系统”兼容,例如,检查“交互系统”场景中的对象,或者将组件添加到interactable中,更多关于该特性的文档将在发布以前发布,示例姿态将在发布前进行改进;复制的skeletalTracingLevel、数组和手指splays到骨骼行为组件中;修正了一些相关的Skeleton文档;为导入部分绑定添加了一个选项,以替换当前操做而不是合并

++++Feature: Added SteamVR_Skeleton_Poser component that simplifies creating poses that are easily compatible with the SteamVR Skeletal System. Check the objects in the Interaction System scene for examples or add the component to an interactable. More documentation on this feature will come before release. Example poses will be improved before release.立钻哥哥:特色:增长了SteamVR_Skeleton_Poser组件,简化了建立姿式,很容易与“SteamVR骨骼系统”兼容。例如,检查“交互系统”场景中的对象,或者将组件添加到interactable中。更多关于该特性的文档将在发布以前发布。示例姿式将在发布前进行改进。

++++Copied skeletalTrackingLevel, arrays, and finger splays into the Skeleton Behaviour component.立钻哥哥:复制的skeletalTrackingLevel、数组和手指splays到骨架行为组件中。

++++Fixed some related skeleton docs.立钻哥哥:修正了一些相关的Skeleton文档.

++++Added an option to importing partial bindings to just replace the current actions instead of merging.立钻哥哥:为导入部分绑定添加了一个选项,以替换当前操做而不是合并。

 

++Changes for v2.2b5

++++立钻哥哥:修正了主程序没有自动引用SteamVR_Actions程序集的问题;修正了对未分配操做的nullcheck错误返回false的问题(headsetOnHead==null, 没有指定操做,返回true

++++Fixed an issue where the SteamVR_Actions assembly was not being auto referenced by the main assembly.(intellisense would not recognize the class)立钻哥哥:修正了主程序集没有自动引用SteamVR_Actions程序集的问题。(智能感知没法识别类)

++++Fixed an issue with nullchecks against unassigned actions returning false incorrectly.(headsetOnHead==null with no action assigned should return true)立钻哥哥:修正了针对未分配操做的nullcheck错误返回false的问题。(headsetOnHead==null,没有指定操做,返回true)

 

++Changes for v2.2b4

++++立钻哥哥:修正了在构建中操做和操做集没有正确反序列化的问题;添加了一个选项,用于管理器中打开构建的操做集调试文本生成;修正了在帧0上自动调用“SteamVR Input”会致使错误的问题

++++Fixed an issue in builds where actions and action sets were not deserializing correctly.立钻哥哥:修正了在构建中操做和操做集没有正确反序列化的问题。

++++Added an option to turn on the action set debug text generation for builds in the manager.立钻哥哥:添加了一个选项,用于在管理器中打开构建的操做集调试文本生成。

++++Fixed an issue where automatic SteamVR Input calls on frame 0 would cause errors.立钻哥哥:修正了在帧0上自动调用“SteamVR输入”会致使错误的问题。

 

++Changes for v2.2b3

++++立钻哥哥:修正了命名动做属性生成问题;修正了没有从操做清单中删除丢失的默认绑定文件的问题

++++Fixed a named action property generation issue.立钻哥哥:修正了命名动做属性生成问题。

++++Fixed an issue with not removing missing default binding files from the action manifest.立钻哥哥:修正了没有从操做清单中删除丢失的默认绑定文件的问题。

 

++Changes for v2.2b2

++++立钻哥哥:修正了生成过程当中的程序集定义问题;向Edge用户添加警告,提醒他们须要手动打开绑定UI

++++Fixed an assembly definition issue during generation.立钻哥哥:修正了生成过程当中的程序集定义问题。

++++Added a warning to Edge users that they need to manually open the binding ui.立钻哥哥:Edge用户添加警告,提醒他们须要手动打开绑定ui。

 

++Changed for v2.2

++++立钻哥哥:这是一个大版本(V2.2)的改动,因此须要重点查看一下

++++Major Breaking Change: To allow for the new SteamVR plugin to use assembly definition files generated action properties have been moved to the SteamVR_Actions class. Since this was already breaking references to actions weve also created friendlier names. SteamVR_Input.__actions_default_in_GripGrab->SteamVR_Actions.default_GripGrab.立钻哥哥:主要的改变:容许新的SteamVR插件使用汇编定义文件生成的动做属性被移动到SteamVR_Actions类。由于这已经破坏了对操做的引用,因此咱们还建立了更友好的名称。SteamVR_Input.__actions_default_in_GripGrab - > SteamVR_Actions.default_GripGrab。

++++Breaking Change: SteamVR_Action_In.GetDeviceComponentName() has been renamed GetRenderModelComponentName because that is more descriptive. This is a non-localized string representing the render models component. Not necessarily the physical component on the device.立钻哥哥:中断更改:SteamVR_Action_In.GetDeviceComponentName()已被重命名为GetRenderModelComponentName(),由于它更具描述性。这是非本地化的字符串,表示呈现模型的组件。不必定是设备上的物理组件。

++++Major Change: Added Indexer/property style action data access. Instead of booleanAction.GetStateDown(SteamVR_Input_Sources.LeftHand); you can now use booleanAction[SteamVR_Input_Sources.LeftHand].stateDown; Or if you dont need to restrict to a specific input source just access booleanAction.stateDown;立钻哥哥:主要更改:添加索引器/属性样式的操做数据访问。而不是booleanAction.GetStateDown (SteamVR_Input_Sources.LeftHand);如今可使用booleanAction[steamvr_input_sources . left].stateDown;或者,若是不须要限制到特定的输入源,只需访问booleanAction.stateDown;

++++Fix for Mixed Reality camera configs. The Example actions now have a mixedreality action set with an ExternalCamera pose action. Set this pose to a tracker/controller and mixed reality should work again. By default the camera tracker type is bound to this action. You can also change the pose thats used in SteamVR/Resources/ExternalCamera.立钻哥哥:修正混合现实相机配置。示例动做如今有一个“mixedreality”动做集和一个“ExternalCamera”姿式动做。将这个姿式设置为跟踪器/控制器,混合现实应该会再次工做。默认状况下,相机跟踪器类型绑定到此操做。你也能够改变SteamVR/Resources/ExternalCamera中使用的姿式。

++++When saving/generating actions the plugin will now automatically remove entries in default binding files for actions that no longer exist.立钻哥哥:当保存/生成操做时,插件将自动删除已不存在的操做的默认绑定文件中的条目。

++++Auto loading OpenVR package for projects that dont have it(2018.1+).立钻哥哥:若是没有OpenVR包的项目将自动加载(2018.1+)。

++++Only updating actions that has been accessed.立钻哥哥:只更新已被访问的操做.

++++Fixed issue where you would get old data from an action recently activated.(立钻哥哥:修正了从最近激活的操做中获取旧数据的问题。

++++Fixed some issues with Unity 2018.3+。立钻哥哥:修正了Unity 2018.3+的一些问题.

++++Significant XML style documentation added in preparation for documentation generation.立钻哥哥:在准备生成文档时添加了重要的XML样式文档。

++++Added C# events with autocomplete to all actions.booleanAction[source].onStateDown += yourMethod will auto-generate a method with named variables!立钻哥哥:向全部操做添加带有自动完成功能的c#事件。actions.booleanAction[源].onStateDown += your方法将自动生成一个带有指定变量的方法!

++++Added C# events to all SteamVR_Behaviour_ActionType components.立钻哥哥:向全部SteamVR_Behaviour_ActionType组件添加c#事件。

++++Added unrestricted input source shortcuts to actions.booleanAction.state is a short-cut to booleanAction[SteamVR_Input_Source.Any].state.立钻哥哥:为actions.booleanAction.state添加不受限制的输入源快捷方式。是booleanAction[SteamVR_Input_Source.Any].state的捷径。

++++Faster initialization.立钻哥哥:更快的初始化

++++Fixed some issues with actions not serializing properly.立钻哥哥:修正了一些操做没有正确序列化的问题.

++++Added DoNotDestroy checkbox to SteamVR_Behaviour component.立钻哥哥:向SteamVR_Behaviour组件添加DoNotDestroy复选框。

++++Active has been split into Active and ActiveBinding-ActiveBinding indicates the action has an active binding, Active indicates the binding is active as well as the containing action set.立钻哥哥:Active已被划分为Active和ActiveBinding-ActiveBinding, activebinding表示动做有一个活动绑定,Active表示绑定和包含的动做集都是活动的。

++++Calls to action data will now only return valid data then the action is active. So actionBoolean.stateDown will always be false if the action is inactive.立钻哥哥:对操做数据的调用如今只会返回有效的数据,而后该操做是活动的。因此actionBoolean.stateDown若是操做处于非活动状态,则将始终为false。

++++Added data parameter to Single, Vector2, Vector3 behaviour events.立钻哥哥:Single、Vector二、Vector3行为事件添加数据参数。

++++Added onState event to Boolean actions that fires when the action is true.立钻哥哥:将onState事件添加到布尔操做中,当操做为真时触发该操做。

++++Added onAxis event to Single, Vector2, and Vector3 actions that fires when the action is non-zero.立钻哥哥:将onAxis事件添加到Single、Vector2和Vector3操做中,这些操做在操做非零时触发。

++++General input system performance increases.立钻哥哥:通常输入系统性能提升

 

++Changes for v2.1.5

++++立钻哥哥:骨骼操做再也不接受输入源做为参数,由于这没有意义,许多骨骼动做方法签名已经改变;为骨骼行为和动做类添加了许多新的有用函数,手指弯曲,手指伸展,参考姿式,跟踪水平,骨骼名称等;添加补充SteamVR_Input.GetLocalizedNameSteamVR_Action_In.GetLocalizedName,它将返回设备组件的本地化名称,以便最后使用该操做,“左手Vive控制器触控板”,您还能够指定名称的哪些部分;修正了在运行时进出SteamVR仪表盘时的主要减速问题

++++Breaking Change: Skeleton actions no longer take a input source as a parameter since this doesnt make sense. A lot of skeleton action method signatures have changed.立钻哥哥:中断更改:骨骼操做再也不接受输入源做为参数,由于这没有意义。许多骨骼动做方法签名已经改变。

++++Added lots of new helpful functions to the skeleton behaviour and action classes. Finger curl, finger splay, reference poses, tracking level, bone names, etc.立钻哥哥:骨骼行为和动做类添加了许多新的有用函数。手指弯曲,手指伸展,参考姿式,跟踪水平,骨骼名称等。

++++Added SteamVR_Input.GetLocalizedName and SteamVR_Action_In.GetLocalizedName that will return the localized name of the device component to last use that action. Left Hand Vive Controller Trackpad. You can specify which parts of the name you want as well.立钻哥哥:添加补充SteamVR_Input.GetLocalizedName SteamVR_Action_In.GetLocalizedName,它将返回设备组件的本地化名称,以便最后使用该操做。“左手Vive控制器触控板”。您还能够指定名称的哪些部分。

++++Fixed a major slowdown with going in and out of the steamvr dashboard at runtime.立钻哥哥:修正了在运行时进出steamvr仪表盘时的主要减速问题。

 

++Changes for v2.1

++++立钻哥哥:v2.1也是一个比较大的版本,因此须要认真查看下面的接口调整说明哟!

++++Major Breaking Change: Actions and ActionSets are no longer Scriptable Objects. Make sure to delete your existing SteamVR_Input folder with all your generated stuff in it. This means you will have to reset all Actions and Action Sets in all prefabs and scenes.立钻哥哥:主要的中断更改:action和actionset再也不是可编写脚本的对象。确保删除包含全部生成内容的现有SteamVR_Input文件夹。这意味着你必须重置全部预设和场景中的全部动做和动做集。

++++Breaking Change: DefaultAction and DefaultActionSet properties no longer exist. Good news: Generation is now near-instant, doesnt require looping through every prefab and every scene. Set defaults through the following format: public SteamVR_Action_Pose poseAction = SteamVR_Input.GetAction<SteamVR_Action_Pose>(Pose); or public SteamVR_Action_Boolean interactWithUI = SteamVR_Input.__actions_default_in_InteractUI;立钻哥哥:中断更改:DefaultAction和DefaultActionSet属性再也不存在。好消息:生成如今几乎是即时的,不须要遍历每一个预置和每一个场景。经过如下格式设置默认值:public SteamVR_Action_Pose poseAction = SteamVR_Input.GetAction<SteamVR_Action_Pose>(" Pose ");public SteamVR_Action_Boolean interactWithUI = steamvr_input . _actions_default_in_interactui;

++++Breaking Change: actionSet.inActions and actionSet.outActions are no longer generated. Were moving all the actions directly to the set level. Previously: SteamVR_Input.default.inActions.GripGrab. Now: SteamVR_Input.default.GripGrab. Collisions of an In-Action with the same name as an Out-Action will be handled by prepending in and out to the field names.立钻哥哥:打破改变:actionSet.inActions 和actionSet.outActions再也不生成输出。咱们将全部操做直接移动到set级别。之前:SteamVR_Input.default.inActions.GripGrab。如今:SteamVR_Input.default.GripGrab。与out操做名称相同的in操做的冲突将经过在字段名称前加上“in”和“out”来处理。

++++Breaking Change: More extensive action set management. Swapped out ActivatePrimary and ActivateSecondary for a single Activate call. You can activate as many sets at once as you want.立钻哥哥:突破性的变化:更普遍的动做集管理。将ActivatePrimary和ActivateSecondary替换为单个激活调用。您能够一次激活任意多个设置。

++++Added ability to create partial input bindings to be used in plugins. Create a partial binding folder and include it in your plugin. When users import your plugin they will be presented with the option to import your actions and bindings.立钻哥哥:增长了建立插件中使用的部分输入绑定的功能。建立一个部分绑定文件夹,并将其包含在插件中。当用户导入插件时,他们将看到导入操做和绑定的选项。

++++Added better tracker support via access to other user paths. Poses can now be bound to user/foot/left, user/foot/right, etc.立钻哥哥:经过访问其余用户路径添加了更好的跟踪器支持。姿式如今能够绑定到用户/脚/左,用户/脚/右,等等。

++++Added access to action set priorities. If you activate an action set with a higher priority it will stop actions bound to the same button in lower priority sets from updating.立钻哥哥:增长了对操做集优先级的访问。若是您激活具备较高优先级的操做集,它将中止更新绑定到较低优先级集中相同按钮的操做。

++++Added action set visualization to live editor window.立钻哥哥:向活动编辑器窗口添加操做集可视化。

++++Added more extensive string access to actions. SteamVR_Input.GetAction(actionName), GetState(actionName, inputSource), GetFloat(actionName, inputSource), GetVector2(actionName, inputSource). 立钻哥哥:添加了对操做的更普遍的字符串访问。SteamVR_Input.GetAction(actionName)GetState(actionName, inputSource)GetFloat(actionName, inputSource)GetVector2(actionName, inputSource)

++++Added proximity sensor action and example. The interaction system will log when you put the headset on/take it off. (binding ui for this still needs fix)立钻哥哥:增长了接近传感器动做和例子。当您戴上/摘下头盔时,交互系统将会记录下来。

++++Fixed some generation and loading issues with 2018.3.立钻哥哥:修正了2018.3的一些生成和加载问题。

++++Bolded [SteamVR] in Debug.log entries.立钻哥哥:在调试日志条目中加粗[SteamVR]

++++Fixed a rigidbody issue with 2018.3.立钻哥哥:修正了2018.3的刚体问题

++++Fixed some issues with delayed loading SteamVR. Added a test scene: SteamVR/Extras/SteamVR_ForceSteamVRMode.unity.立钻哥哥:修正了延迟加载SteamVR的一些问题。添加了一个测试场景:SteamVR/Extras/SteamVR_ForceSteamVRMode.unity。

++++Readded the laser pointer extra with an example scene: SteamVR/Extras/SteamVR_LaserPointer.unity.立钻哥哥:用一个示例场景读取了额外的激光指示器:SteamVR/Extras/ steamvr_laserpoint .unity。

++++Fixed auto-enabling of vr mode in recent unity versions.(Reminder you can disable this in: Edit Menu->Preferences->SteamVR)立钻哥哥:固定的自动启用vr模式在最近的统一版本。(提醒您能够禁用:编辑菜单->首选项->SteamVR)

++++Fixed action set renaming so it renames all actions in its set. Does not currently modify default bindings though.立钻哥哥:固定的操做集重命名,所以它重命名其集合中的全部操做。但目前不修改默认绑定。

++++Fixed basic fallback hand support. 立钻哥哥:修正了基本的后撤手支持

++++Moved automatic enabling of VR in player settings to the SteamVR_Settings.asset file in SteamVR/Resources. This allows better per project settings.立钻哥哥:player设置中的VR自动启用移动到SteamVR/Resources中的SteamVR_Settings.asset资源文件。这容许更好的每一个项目设置。

++++Gave better error when SteamVR fails to initialize with oculus devices.立钻哥哥:当SteamVR没法使用oculus设备初始化时,给出了更好的错误。

 

++Assets

++++立钻哥哥:SteamVR_v220.unitypackage;

++++https://github.com/ValveSoftware/steamvr_unity_plugin/releases

 

 

 

 

 

 

 

#第二篇:v2.2.0的Documentation技术资料

#第二篇:v2.2.0的Documentation技术资料

#第二篇:v2.2.0的Documentation技术资料

++++立钻哥哥:https://github.com/ValveSoftware/steamvr_unity_plugin/releases

++++B.一、Documentation

++++B.二、Quick Start

++++B.三、立钻哥哥对技术资料的拓展

 

 

 

##B.一、Documentation

##B.一、Documentation

++B.一、Documentation

++++立钻哥哥:https://valvesoftware.github.io/steamvr_unity_plugin/

++++B.1.一、API level documentation

++++B.1.二、articles

++++B.1.三、tutorials

 

 

 

###B.1.一、API level documentation

###B.1.一、API level documentation

++B.1.一、API level documentation(API级别的文档

++++立钻哥哥:https://valvesoftware.github.io/steamvr_unity_plugin/api/index.html

 

 

++SteamVR Unity Plugin

++++立钻哥哥:This is the class by class, member by member documentation for the [SteamVR Unity Plugin]. It is not complete. If you would like summary or example information for a specific class or member please post a request in the Issues section of the github repo.立钻哥哥:这是一个类一个类,一个成员一个成员的文档为[SteamVR Unity插件]。它并不完整。若是您想要特定类或成员的摘要或示例信息,请在github repo的问题部分中发布请求。

++++https://github.com/ValveSoftware/steamvr_unity_plugin/issues/

 

 

++SteamVR_Settings

++++立钻哥哥:Located in Assets/SteamVR/Resources you will find a SteamVR_Settings asset that has a couple setting on it you may find useful. Namely when the input system updates the actions. It also contains a boolean that decides whether to automatically enable VR for the project. If you have this plugin installed and are trying to disable VR you will need to uncheck this box first. 立钻哥哥:位于Assets/SteamVR/Resources中,您将发现一个SteamVR_Settings资源,其中有几个设置,您可能会发现它颇有用。即当输入系统更新操做时。它还包含一个布尔值,用于决定是否为项目自动启用VR。若是你安装了这个插件,并试图禁用VR,你将须要取消勾选此框首先。

 

 

++SteamVR_Actions

++++立钻哥哥:The Actions class will be generated for you when you hit Save and Generate in the SteamVR Input window. It gives you named access to all your actions. For example, if you have an action named Plant in the action set Farming you can access it through the actionset at SteamVR_Actions.Farming.Plant or just at the root of the class at SteamVR_Actions.Farming_Plant.立钻哥哥:当您在“SteamVR输入窗口”中点击“Save and Generate”时,Actions类将为您生成。它为您提供了对全部操做的命名访问。例如,若是您在操做集“Farming”中有一个名为“Plant”的操做,您能够经过“SteamVR_Actions.Farming.Plant”访问它。或者只在类的根目录“SteamVR_Actions.Farming_Plant”。

 

 

++SteamVR_Input

++++立钻哥哥:Here is where most of the helper functions live to access your actions in code. 这里是大多数helper函数访问代码中的操做的地方。

++++You can get a reference to a specific action by name through a generic function GetAction<SteamVR_Action_Boolean>(Plant) or through a type-named function GetBooleanAction(Plant).立钻哥哥:您能够经过通用函数GetAction<SteamVR_Action_Boolean>(“Plant”)或类型命名函数GetBooleanAction(“Plant”)按名称得到对特定操做的引用。

++++You can also pass in the full path to the action: GetActionByPath<SteamVR_Action_Boolean>(/Farming/in/Plant) if you have a lot of actions or want the best performance.立钻哥哥:若是您有不少操做或者但愿得到最佳性能,还能够将完整路径传递给操做:GetActionByPath<SteamVR_Action_Boolean>(“/Farming/in/Plant”)

++++These classes are nice because they give you access to common events and faster data access. (立钻哥哥:这些类很好,由于它们提供了对公共事件的访问和更快的数据访问。

++++But if youd rather just access the data directly instead of going through the action class you can use more familiar calls GetStateDown(Plant, SteamVR_Input_Sources.LeftHand).立钻哥哥:可是,若是您但愿直接访问数据而不是经过action类,则可使用更熟悉的调用GetStateDown(“Plant”,steamvr_input_sources . left .)

++++Different than normal Unity input youll need to pass in the Input Source you want to get the data from. 立钻哥哥:与普通的Unity输入不一样的是,你须要传入你想要得到数据的“输入源”。

++++That can be Any, or quite a number of more specific sources(LeftHand, RightHand, etc). Any will combine all sources (ORd) in to one set of data.立钻哥哥:能够是任何,也能够是许多更具体的资源(左手,右手,等等)。Any将把全部源(或d)合并到一组数据中。

 

 

++SteamVR_Behaviour(V2.2.0)

++++立钻哥哥:This(SteamVR_Behaviour) is the component that manages most of the input system in relation to unity events. You shouldnt generally need to interact with it besides making sure its in your scenes and doesnt get accidentally deleted. It should be automatically added to a scene at runtime when one isnt found.立钻哥哥:这是管理与unity事件相关的大部分输入系统的组件。除了确保它在你的场景中而且不会被意外删除以外,你一般不须要与它进行交互。它应该在运行时自动添加到一个场景,当一个没有找到。

++++\Assets\SteamVR\Scripts\SteamVR_Behaviour.cs

using System;

using System.Collections;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using UnityEngine;

 

#if UNITY_2017_2_OR_NEWER

    using UnityEngine.VR;

#else

    using XRSettings = UnityEngine.VR.VRSettings;

    using XRDevice = UnityEngine.VR.VRDevices;

#endif

 

namespace Valve.VR{

    public class SteamVR_Behaviour : MonoBehaviour{

        private const string openVRDeviceName = OpenVR;

        public static bool forcingInitialization = false;

 

        private static SteamVR_Behaviour _instance;

        public static SteamVR_Behaviour instance{}

 

        public bool initializeSteamVROnAwake = true;

        public bool doNotDestroy = true;

 

        [HideInInspector]

        public SteamVR_Render steamvr_render;

 

        private static bool initializing = false;

        public static void Initialize(bool forceUnityVRToOpenVR = false){}

 

        protected void Awake(){}

 

        public void InitializeSteamVR(bool forceUnityVRToOpenVR = false){}

 

        private void EnableOpenVR(){

            XRSettings.enabled = true;

            SteamVR.Initialize(false);

            initializeCoroutine = null;

            forcingInitialization = false;

        }

 

        protected static int lastFrameCount = -1;

        protected void PreCull(){}

 

        protected void FixedUpdate(){}

        protected void LateUpdate(){}

        protected void Update(){}

 

        protected void OnQuit(VREvent_t vrEvent){

            #if UNITY_EDITOR

                UnityEditor.EditorApplication.isPlaying = false;

            #else

                Application.Quit();

            #endif

        }

 

    }    //立钻哥哥:public class SteamVR_Behaviour:MonoBehaviour{}

 

}    //立钻哥哥:namespace Valve.VR{}

 

 

++SteamVR_Behaviour_Pose(V2.2.0)

++++立钻哥哥:The pose behaviour component(SteamVR_Behaviour_Pose) is what orients tracked objects. Add this to a GameObject to automatically set the position and rotation of the transform to match your tracked object(usually controllers). It also contains velocity data and a variety of helper functions for common orientation functions.立钻哥哥:姿态行为组件(SteamVR_Behaviour_Pose) 是跟踪对象的方向。将其添加到GameObject(游戏对象)中,以自动设置转换的位置和旋转,以匹配您跟踪的对象(一般是控制器)。它还包含速度数据和各类辅助函数用于常见的定向函数。

++++\Assets\SteamVR\Input\SteamVR_Behaviour_Pose.cs

using System;

using System.Threading;

using UnityEngine;

using UnityEngine.Events;

using Valve.VR;

 

namespace Valve.VR{

    //This component simplifies the use of Pose actions. Addint it to a gameobject will auto set that transforms position and rotation every update to match the pose.(立钻哥哥:这个组件简化了姿态动做的使用。将其添加到gameobject(游戏物体)中,将自动设置转换位置并在每次更新时旋转以匹配该姿态。

    //Advanced velocity estimation is handled through a buffer of the last 30 updates.(立钻哥哥:高级速度估计是经过最近30次更新的缓冲区来处理的。

    public class SteamVR_Behaviour_Pose : MonoBehaviour{

        public SteamVR_Action_Pose poseAction = SteamVR_Input.GetAction<SteamVR_Action_Pose>(Pose);

 

        [Tooltip(The device this action should apply to. Any if the action is not device specific.(立钻哥哥:此操做应应用于的设备。若是操做不是特定于设备的,则为Any。)]

        public SteamVR_Input_Sources inputSource;

 

        [Tooltip(If not set, relative to parent.(立钻哥哥:若是没有设置,相对于父节点.)]

        public Transform origin;

 

        //Returns whether or not the current pose is in a valid state.(立钻哥哥:返回当前位姿是否处于有效状态

        public bool isValid{}

 

        //Returns whether or not the pose action is bound and able to be updated.(立钻哥哥:返回是否绑定了位姿操做并可以更新.

        public bool isActive{}

 

        //This Unity event will fire whenever the position or rotation of this transform is updated.(立钻哥哥:每当更新此转换的位置或旋转时,此Unity事件将触发。

        public SteamVR_Behaviour_PoseEvent onTransformUpdated;

 

        //This Unity event will fire whenever the position or rotation of this transform is changed.(立钻哥哥:每当这个转换的位置或旋转发生更改时,这个Unity事件就会触发.

        public SteamVR_Behaviour_PoseEvent onTransformChanged;

 

        //This Unity event will fire whenever the device is connected or disconnected.(立钻哥哥:这个Unity事件将在设备链接或断开链接时触发.

        public SteamVR_Behaviour_Pose_ConnectedChangedEvent onConnectedChanged;

 

        //This Unity event will fire whenever the devices tracking state changes.(立钻哥哥:每当设备的跟踪状态发生变化时,这个Unity事件就会触发.

        public SteamVR_Behaviour_Pose_TrackingChangedEvent onTrackingChanged;

 

        //This Unity event will fire whenever the devices deviceIndex changes.(立钻哥哥:每当设备的deviceIndex发生变化时,这个Unity事件就会触发

        public SteamVR_Behaviour_Pose_DeviceIndexChangedEvent onDeviceIndexChanged;

 

        //This C# event will fire whenever the position or rotation of this transform is updated.(立钻哥哥:每当更新此转换的位置或旋转时,此c#事件将触发

        public UpdateHandler onTransformUpdatedEvent;

 

        //This C# event will fire whenever the position or rotation of this transform is changed.(立钻哥哥:每当更改此转换的位置或旋转时,此c#事件将触发.

        public ChangeHandler onTransformChangedEvent;

 

        //This C# event will fire whenever the device is connected or disconnected.(立钻哥哥:这个c#事件将在设备链接或断开链接时触发.

        public DeviceConnectedChangeHandler onConnectedChangedEvent;

 

        //This C# event will fire whenever the devices tracking state changes.(立钻哥哥:每当设备的跟踪状态发生变化时,这个c#事件就会触发

        public TrackingChangeHandler onTrackingChangedEvent;

 

        //This C# event will fire whenever the devices deviceIndex changes.(立钻哥哥:这个c#事件将在设备的deviceIndex发生更改时触发

        public DeviceIndexChangedHandler onDeviceIndexChangedEvent;

 

        [Tooltip(Can be disabled to stop broadcasting bound device status changes.(立钻哥哥:能够禁用以中止广播绑定设备状态更改)]

        public bool broadcastDeviceChanges = true;

 

        protected int deviceIndex = -1;

    

        protected SteamVR_HistoryBuffer historyBuffer = new SteamVR_HistoryBuffer(30);

 

        protected virtual void Start(){}

        protected virtual void OnEnable(){}

        protected virtual void OnDisable(){}

        private void SteamVR_Behaviour_Pose_Update(SteamVR_Action_Pose fromAction, SteamVR_Input_Sources fromSource){}

        protected virtual void UpdateTransform(){}

        private void SteamVR_Behaviour_Pose_OnChange(SteamVR_Action_Pose fromAction, SteamVR_Input_Sources fromSource){}

        protected virtual void OnDeviceConnectedChanged(SteamVR_Action_Pose changedAction, SteamVR_Input_Sources changedSource, bool connected){}

        protected virtual void OnTrackingChanged(SteamVR_Action_Pose changedAction, SteamVR_Input_Sources changedSource, ETrackingResult trackingChanged){}

        protected virtual void CheckDeviceIndex(){}

 

        //Returns the device index for the device bound to the pose.(立钻哥哥:返回绑定到姿态的设备的设备索引.

        public int GetDeviceIndex(){}

 

        //Returns the current velocity of the pose (as of the last update).(立钻哥哥:返回姿态的当前速度(截至上次更新时)

        public Vector3 GetVelocity(){}

 

        //Returns the current angular velocity of the pose (as of the last update).(立钻哥哥:返回姿态的当前角速度(截至上次更新时)

        public Vector3 GetAngularVelocity(){}

 

        //Returns the velocities of the pose at the time specified. Can predict in the future or return past values.(立钻哥哥:返回指定时刻的姿态速度。能够预测将来或返回过去的值

        public bool GetVelocitiesAtTimeOffset(float secondsFromNow, out Vector3 velocity, out Vector3 angularVelocity){}

 

        //Uses previously recorded values to find the peak speed of the pose and returns the corresponding velocity and angular velocity.(立钻哥哥:使用以前记录的值来查找位姿的峰值速度,并返回相应的速度和角速度

        public void GetEstimatedPeakVelocites(out Vector3 velocity, out Vector3 angularVelocity){}

 

        protected int lastFrameUpdated;

        protected void UpdateHistoryBuffer(){}

 

        //Gets the localized name of the device that the action corresponds to.(立钻哥哥:获取操做对应的设备的本地化名称

        public string GetLocalizedName(params EVRInputStringBits[] localizedParts){}

 

        //立钻哥哥:一些委托的定义

        public delegate void ActiveChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, bool active);

        public delegate void ChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource);

        public delegate void UpdateHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource);

        public delegate void TrackingChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, ETrackingResult trackingState);

        public delegate void ValidPoseChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, bool validPose);

        public delegate void DeviceConnectedChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, bool deviceConnected);

        public delegate void DeviceIndexChangedHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, int newDeviceIndex);

 

    }    //立钻哥哥:public class SteamVR_Behaviour_Pose:MonoBehaviour{}

 

}    //立钻哥哥:namespace Valve.VR{}

 

 

++SteamVR_Behaviour_Skeleton

++++立钻哥哥:Uses SteamVR Skeleton Input (SteamVR_Behaviour_Skeleton) to give you a hand that is our best guess of where each joint is at that time. Varies in accuracy depending on the controller and tracking system currently being used. This can also orient the GameObject inline with the controller. So you dont need a pose and a skeleton behaviour on the same object.立钻哥哥:使用“SteamVR骨骼输入” (SteamVR_Behaviour_Skeleton) 来帮助您猜想每一个关节的位置。根据当前使用的控制器和跟踪系统的不一样,精度也有所不一样。这也能够将GameObject内联到控制器中。因此你不须要在同一个物体上有一个姿式和一个骨架行为。

++++\Assets\SteamVR\Input\SteamVR_Behaviour_Skeleton.cs

using System;

using System.Collections;

using UnityEngine;

using UnityEngine.Events;

using Valve.VR;

 

namespace Valve.VR{

    public class SteamVR_Behaviour_Skeleton : MonoBehaviour{

        [Tooltip(If not set, will try to auto assign this based on Skeleton + inputSource(立钻哥哥:若是没有设置,将尝试基于' Skeleton ' + inputSource自动分配该值))]

        //The action this component will use to update the model. Must be a Skeleton type action.(立钻哥哥:此组件将用于更新模型的操做。必须是骨架类型的操做

        public SteamVR_Action_Skeleton skeletonAction;

 

        [Tooltip(The device this action should apply to. Any if the action is not device specific.(立钻哥哥:此操做应应用于的设备。若是操做不是特定于设备的,则为Any。)]

        public SteamVR_Input_Sources inputSource;

 

        public EVRSkeletalMotionRange rangeOfMotion = EVRSkeletalMotionRange.WithoutController;

        public Transform skeletonRoot;

        public Transform origin;

        public bool updatePose = true;

        public bool onlySetRotations = false;

 

        [Range(0, 1)]

        public float skeletonBlend = 1f;

 

        public SteamVR_Behaviour_SkeletonEvent onBoneTransformsUpdated;

        public SteamVR_Behaviour_SkeletonEvent onTransformUpdated;

        public SteamVR_Behaviour_SkeletonEvent onTransformChanged;

        public SteamVR_Behaviour_Skeleton_ConnectedChangedEvent onConnectedChanged;

        public SteamVR_Behaviour_Skeleton_TrackingChangedEvent onTrackingChanged;

 

        public UpdateHandler onBoneTransformsUpdatedEvent;

        public UpdateHandler onTransformUpdatedEvent;

        public ChangeHandler onTransformChangedEvent;

        public DeviceConnectedChangeHandler onConnectedChangedEvent;

        public TrackingChangeHandler onTrackingChangedEvent;

 

        protected SteamVR_Skeleton_Poser blendPoser;

        protected SteamVR_Skeleton_PoseSnapshot blendSnapshot;

 

        //Can be set to mirror the bone data across the x axis.(立钻哥哥:能够设置为在x轴上镜像骨数据

        public MirrorType mirroring;

 

        //An array of five 0-1 values representing how curled a finger is. 0 being straight, 1 being fully curled. Index 0 being thumb, index 4 being pinky.(立钻哥哥:由5个0-1值组成的数组,表示手指弯曲的程度。0是直的,1是彻底卷曲的。索引0是大拇指,索引4是小指。

        public bool isActive{}

        public float[] fingerCurls{}

        public float thumbCurl{}

        public float indexCurl{}

        public float middleCurl{}

        public float ringCurl{}

        public float pinkyCurl{}

 

        public Transform[] proximals{}

        public Transform[] middles{}

        public Transform[] distals{}

        public Transform[] tips{}

        public Transform[] auxs{}

 

        protected Coroutine blendRoutine;

        protected Coroutine rangeOfMotionBlendRoutine;

        protected Coroutine attachRoutine;

    

        protected Transform[] bones;

 

        //The range of motion that is set temporarily (call ResetTemporaryRangeOfMotion to reset to rangeOfMotion)(立钻哥哥:临时设置的运动范围(调用ResetTemporaryRangeOfMotion将其重置为rangeOfMotion)

        protected EVRSkeletalMotionRange? temporaryRangeOfMotion = null;

 

        //Get the accuracy level of the skeletal tracking data.(立钻哥哥:获取骨骼跟踪数据的精度级别.

        public EVRSkeletalTrackingLevel skeletalTrackingLevel{}

 

        public bool isBlending{}

        public float predictedSecondsFromNow{}

        public SteamVR_ActionSet actionSet{}

        public SteamVR_ActionDirections direction{}

 

        protected virtual void Awake(){}

        protected virtual void CheckSkeletonAction(){}

        protected virtual void AssignBonesArray(){}

        protected virtual void OnEnable(){}

        protected virtual void OnDisable(){}

    

        private void OnDeviceConnectedChanged(SteamVR_Action_Skeleton fromAction, bool deviceConnected){}

        private void OnTrackingChanged(SteamVR_Action_Skeleton fromAction, ETrackingResult trackingState){}

        protected virtual void SteamVR_Input_OnSkeletonsUpdated(bool skipSendingEvents){}

        protected virtual void UpdateSkeleton(){}

 

        //Sets a temporary range of motion for this action that can easily be reset (using ResetTemporaryRangeOfMotion).(立钻哥哥:为这个动做设置一个能够轻松重置的临时运动范围(使用ResetTemporaryRangeOfMotion)

        //This is useful for short range of motion changes, for example picking up a controller shaped object.(立钻哥哥:这对于短时间的运动变化颇有用,例如拾起一个控制器形状的对象

        public void SetTemporaryRangeOfMotion(EVRSkeletalMotionRange newRangeOfMotion, float blendOverSeconds = 0.1f){}

 

        public void SetRangeOfMotion(EVRSkeletalMotionRange newRangeOfMotion, float blendOverSeconds = 0.1f){}

        public void BlendToSkeleton(float overTime = 0.1f){}

        public void BlendToPoser(SteamVR_Skeleton_Poser poser, float overTime = 0.1f){}

        public void BlendToAnimation(float overTime = 0.1f){}

        public void BlendTo(float blendToAmount, float overTime){}

    

        protected IEnumerator DoBlendRoutine(float blendToAmout, float overTime){}

        protected void RangeOfMotionBlend(EVRSkeletalMotionRange newRangeOfMotion, float blendOverSeconds){}

        protected void TemporaryRangeOfMotionBlend(EVRSkeletalMotionRange newRangeOfMotion, float blendOverSeconds){}

        protected void ResetTemporaryRangeOfMotionBlend(float blendOverSeconds){}

        protected IEnumerator DoRangeOfMotionBlend(EVRSkeletalMotionRange oldRangeOfMotion, EVRSkeletalMotionRange newRangeOfMotion, float overTime){}

        protected vritual Quaternion GetBlendPoseForBone(int boneIndex, Quaternion skeletonRotation){}

        protected virtual void UpdateSkeletonTransforms(){}

        protected virtual void SetBonePosition(int boneIndex, Vector3 localPosition){}

        protected virtual void SetBoneRotation(int boneIndex, Quaternion localRotation){}

 

        public virtual Transform GetBone(int joint){}

        public Vector3 GetBonePosition(int joint, bool local = false){}

        public Quaternion GetBoneRotation(int joint, bool local = false){}

 

        protected Vector3[] GetBonePositions(){}

 

        protected Quaternion rightFlipAngle = Quaternion.AngleAxis(180, Vector3.right);

        protected Quaternion[] GetBoneRotations(){}

        protected virtual void UpdatePose(){}

    

        public void ForceToReferencePose(EVRSkeletalReferencePose referencePose){}

    

        protected bool IsMetacarpal(int boneIndex){}

 

        public enum MirrorType{

            None,

            LeftToRight,

            RightToLeft

        }

 

        //立钻哥哥:定义的一些委托

        public delegate void ActiveChangeHandler(SteamVR_Behaviour_Skeleton fromAction, SteamVR_Input_Sources inputSource, bool active);

        public delegate void ChangeHandler(SteamVR_Behaviour_Skeleton fromAction, SteamVR_Input_Sources inputSource);

        public delegate void UpdateHandler(SteamVR_Behaviour_Skeleton fromAction, SteamVR_Input_Sources inputSource);

        public delegate void TrackingChangeHandler(SteamVR_Behaviour_Skeleton fromAction, SteamVR_Input_Sources inputSource, ETrackingResult trackingState);

        public delegate void ValidPoseChangeHandler(SteamVR_Behaviour_Skeleton fromAction, SteamVR_Input_Sources inputSource, bool validPose);

        public delegate void DeviceConnectedChangeHandler(SteamVR_Behaviour_Skeleton fromAction, SteamVR_Input_Sources inputSource, bool deviceConnected);

 

    }    //立钻哥哥:public class SteamVR_Behaviour_Skeleton:MonoBehaviour{}

 

}    //立钻哥哥:namespace Valve.VR{}

 

 

++SteamVR_Behaviour_Boolean/Single/Vector2/Vector3

++++立钻哥哥:These(SteamVR_Behaviour_BooleanSteamVR_Behaviour_SingleSteamVR_Behaviour_Vector2SteamVR_Behaviour_Vector3) are components designed to give you easy access to an action by the same name and a place to use UnityEvents if that is your preference. They also have some helpful functions designed around common scenarios for those actions. If you find yourself running into things you wish these helper components had, feel free to create an Issue on the github.立钻哥哥:这些组件(SteamVR_Behaviour_BooleanSteamVR_Behaviour_SingleSteamVR_Behaviour_Vector2SteamVR_Behaviour_Vector3) 的设计目的是让您方便地访问同名操做,若是您愿意,还可使用UnityEvents。它们还围绕这些操做的常见场景设计了一些有用的功能。若是您发现本身遇到了但愿这些帮助组件具备的功能,请随意在github上建立一个问题。

 

++++\Assets\SteamVR\Input\SteamVR_Behaviour_Boolean.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using UnityEngine;

using UnityEngine.Events;

 

namespace Valve.VR{

    //This component simplifies using boolean actions.(立钻哥哥:该组件使用布尔操做进行简化

    public class SteamVR_Behaviour_Boolean : MonoBehaviour{

        public SteamVR_Action_Boolean booleanAction;

        public SteamVR_Input_Sources inputSource;

 

        public SteamVR_Behaviour_BooleanEvent onChange;

        public event ChangeHandler onChangeEvent;

 

        public SteamVR_Behaviour_BooleanEvent onUpdate;

        public event UpdateHandler onUpdateEvent;

 

        public SteamVR_Behaviour_BooleanEvent onPress;

        public event StateHandler onPressEvent;

 

        public SteamVR_Behaviour_BooleanEvent onPressDown;

        public event StateDownHandler onPressDownEvent;

 

        public SteamVR_Behaviour_BooleanEvent onPressUp;

        public event StateUpHandler onPressUpEvent;

 

        public bool isActive{}

        public SteamVR_ActionSet actionSet{}

 

        protected virtual void OnEnable(){}

        protected virtual void OnDisable(){}

 

        protected void AddHandles(){

            booleanAction[inputSource].onUpdate += SteamVR_Behaviour_Boolean_OnUpdate;

            booleanAction[inputSource].onChange += SteamVR_Behaviour_Boolean_OnChange;

            booleanAction[inputSource].onState += SteamVR_Behaviour_Boolean_OnState;

            booleanAction[inputSource].onStateDown += SteamVR_Behaviour_Boolean_OnStateDown;

            booleanAction[inputSource].onStateUp += SteamVR_Behaviour_Boolean_OnStateUp;

        }

 

        protected void RemoveHandlers(){

            if(booleanAction != null){

                booleanAction[inputSource].onUpdate -= SteamVR_Behaviour_Boolean_OnUpdate;

                booleanAction[inputSource].onChange -= SteamVR_Behaviour_Boolean_OnChange;

                booleanAction[inputSource].onState -= SteamVR_Behaviour_Boolean_OnState;

                booleanAction[inputSource].onStateDown -= SteamVR_Behaviour_Boolean_OnStateDown;

                booleanAction[inputSource].onStateUp -= SteamVR_Behaviour_Boolean_OnStateUp;

            }

        }

 

        private void SteamVR_Behaviour_Boolean_OnStateUp(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource){}

        private void SteamVR_Behaviour_Boolean_OnStateDown(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource){}

        private void SteamVR_Behaviour_Boolean_OnState(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource){}

        private void SteamVR_Behaviour_Boolean_OnUpdate(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource){}

        private void SteamVR_Behaviour_Boolean_OnChange(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource){}

 

        //Gets the localized name of the device that the action corresponds to.(立钻哥哥:获取操做对应的设备的本地化名称

        public string GetLocalizedName(params EVRInputStringBits[] localizedParts){}

 

        public delegate void StateDownHandler(SteamVR_Behaviour_Boolean fromAction, SteamVR_Input_Sources fromSource);

        public delegate void StateUpHandler(SteamVR_Behaviour_Boolean fromAction, SteamVR_Input_Sources fromSource);

        public delegate void StateHandler(SteamVR_Behaviour_Boolean fromAction, SteamVR_Input_Sources fromSource);

        public delegate void ActiveChangeHandler(SteamVR_Behaviour_Boolean fromAction, SteamVR_Input_Sources fromSource, bool active);

        public delegate void ChangeHandler(SteamVR_Behaviour_Boolean fromAction, SteamVR_Input_Sources fromSource, bool newState);

        public delegate void UpdateHandler(SteamVR_Behaviour_Boolean fromAction, SteamVR_Input_Sources fromSource, bool newState);

 

    }    //立钻哥哥:public class SteamVR_Behaviour_Boolean:MonoBehaviour{}

 

}    //立钻哥哥:namespace Valve.VR{}

 

 

++++\Assets\SteamVR\Input\SteamVR_Behaviour_Single.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using UnityEngine;

using UnityEngine.Events;

 

namespace Valve.VR{

    //SteamVR_Behaviour_Single simplifies the use of single actions. It gives an event to subscribe to for when the action has changed.(立钻哥哥:SteamVR_Behaviour_Single简化了单个操做的使用。它提供一个事件,以便在操做更改时订阅.

    public class SteamVR_Behaviour_Single : MonoBehaviour{

        //The single action to get data from.(立钻哥哥:获取数据的单个操做

        public SteamVR_Action_Single singleAction;

 

        public SteamVR_Input_Sources inputSource;

        public SteamVR_Behaviour_SingleEvent onChange;

        public SteamVR_Behaviour_SingleEvent onUpdate;

        public SteamVR_Behaviour_SingleEvent onAxis;

 

        public ChangeHandler onChangeEvent;

        public UpdateHandler onUpdateEvent;

        public AxisHandler onAxisEvent;

 

        public bool isActive{}

 

        protected virtual void OnEnable(){}

        protected virtual void OnDisable(){}

 

        protected void AddHandlers(){

            singleAction[inputSource].onUpdate += SteamVR_Behaviour_Single_OnUpdate;

            singleAction[inputSource].onChange += SteamVR_Behaviour_Single_OnChange;

            singleAction[inputSource].onAxis += SteamVR_Behaviour_Single_OnAxis;

        }

 

        protected void RemoveHandlers(){

            if(singleAction != null){

                singleAction[inputSource].onUpdate -= SteamVR_Behaviour_Single_OnUpdate;

                singleAction[inputSource].onChange -= SteamVR_Behaviour_Single_OnChange;

                singleAction[inputSource].onAxis -= SteamVR_Behaviour_Single_OnAxis;

            }

        }

 

        private void SteamVR_Behaviour_Single_OnUpdate(SteamVR_Action_Single fromAction, SteamVR_Input_Sources fromSource, float newAxis, float newDelta){}

        private void SteamVR_Behaviour_Single_OnChange(SteamVR_Action_Single fromAction, SteamVR_Input_Sources fromSource, float newAxis, float newDelta){}

        private void SteamVR_Behaviour_Single_OnAxis(SteamVR_Action_Single fromAction, SteamVR_Input_Sources fromSource, float newAxis, float newDelta){}

 

        //Gets the localized name of the device that the action corresponds to.(立钻哥哥:获取操做对应的设备的本地化名称.

        public string GetLocalizedName(params EVRInputStringBits[] localizedParts){}

 

        //立钻哥哥:定义了一些委托

        public delegate void AxisHandler(SteamVR_Behaviour_Single fromAction, SteamVR_Input_Sources fromSource, float newAxis,float newDelta );

        public delegate void ChangeHandler(SteamVR_Behaviour_Single fromAction, SteamVR_Input_Sources fromSource, float newAxis, float newDelta);

        public delegate void UpdateHandler(SteamVR_Behaviour_Single fromAction, SteamVR_Input_Sources fromSource, float newAxis, float newDelta);

 

    }    //立钻哥哥:public class SteamVR_Behaviour_Single:MonoBehaviour{}

 

}    //立钻哥哥:namespace Valve.VR{}

 

++++\Assets\SteamVR\Input\SteamVR_Behaviour_Vector2.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using UnityEngine;

using UnityEngine.Events;

 

namespace Valve.VR{

    //Simplifies the use of the Vector2 action. Provides an onChange event that fires whenever the vector2 changes.(立钻哥哥:简化Vector2操做的使用。提供一个onChange事件,该事件在vector2发生更改时触发.

    public class SteamVR_Behaviour_Vector2 : MonoBehavour{

        //The vector2 action to get data from.(立钻哥哥:要从中获取数据的vector2操做

        public SteamVR_Action_Vector2 vector2Action;

 

        public SteamVR_Input_Sources inputSource;

        public SteamVR_Behaviour_Vector2Event onChange;

        public SteamVR_Behaviour_Vector2Event onUpdate;

        public SteamVR_Behaviour_Vector2Event onAxis;

 

        public ChangeHandler onChangeEvent;

        public UpdateHandler onUpdateEvent;

        public AxisHandler onAxisEvent;

 

        public bool isActive{}

 

        protected virtual void OnEnable(){}

        protected virtual void OnDisable(){}

 

        protected void AddHandlers(){

            vector2Action[inputSource].onUpdate += SteamVR_Behaviour_Vector2_OnUpdate;

            vector2Action[inputSource].onChange += SteamVR_Behaviour_Vector2_OnChange;

            vector2Action[inputSource].onAxis += SteamVR_Behaviour_Vector2_OnAxis;

        }

 

        protected void RemoveHandlers(){

            if(vector2Action != null){

                vector2Action[inputSource].onUpdate -= SteamVR_Behaviour_Vector2_OnUpdate;

                vector2Action[inputSource].onChange -= SteamVR_Behaviour_Vector2_OnChange;

                vector2Action[inputSource].onAxis -= SteamVR_Behaviour_Vector2_OnAxis;

            }

        }

 

        private void SteamVR_Behaviour_Vector2_OnUpdate(SteamVR_Action_Vector2 fromAction, SteamVR_Input_Sources fromSource, Vector2 newAxis, Vector2 newDelta){}

        private void SteamVR_Behaviour_Vector2_OnChange(SteamVR_Action_Vector2 fromAction, SteamVR_Input_Sources fromSource, Vector2 newAxis, Vector2 newDelta){}

        private void SteamVR_Behaviour_Vector2_OnAxis(SteamVR_Action_Vector2 fromAction, SteamVR_Input_Sources fromSource, Vector2 newAxis, Vector2 newDelta){}

 

        //Gets the localized name of the device that the action corresponds to.(立钻哥哥:获取操做对应的设备的本地化名称.

        public string GetLocalizedName(params EVRInputStringBits[] localizedParts){}

 

        public delegate void AxisHandler(SteamVR_Behaviour_Vector2 fromAction, SteamVR_Input_Sources fromSource, Vector2 newAxis, Vector2 newDelta);

        public delegate void ChangeHandler(SteamVR_Behaviour_Vector2 fromAction, SteamVR_Input_Sources fromSource, Vector2 newAxis, Vector2 newDelta);

        public delegate void UpdateHandler(SteamVR_Behaviour_Vector2 fromAction, SteamVR_Input_Sources fromSource, Vector2 newAxis, Vector2 newDelta);

 

    }    //立钻哥哥:public class SteamVR_Behaviour_Vector2:MonoBehaviour{}

 

}    //立钻哥哥:namesapce Valva.VR{}

 

++++\Assets\SteamVR\Input\SteamVR_Behaviour_Vector3.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using UnityEngine;

using UnityEngine.Events;

 

namespace Valve.VR{

    public class SteamVR_Behaviour_Vector3 : MonoBehaviour{

        //The Vector3 action to get data from.(立钻哥哥:要从中获取数据的Vector3操做

        public SteamVR_Action_Vector3 vector3Action;

 

        public SteamVR_Input_Sources inputSource;

        public SteamVR_Behaviour_Vector3Event onChange;

        public SteamVR_Behaviour_Vector3Event onUpdate;

        public SteamVR_Behaviour_Vector3Event onAxis;

 

        public ChangeHandler onChangeEvent;

        public UpdateHandler onUpdateEvent;

        public AxisHandler onAxisEvent;

 

        public bool isActive{}

 

        protected virtual void OnEnable(){}

        protected virtual void OnDisable(){}

 

        protected void AddHandlers(){

            vector3Action[inputSource].onUpdate += SteamVR_Behaviour_Vector3_OnUpdate;

            vector3Action[inputSource].onChange += SteamVR_Behaviour_Vector3_OnChange;

            vector3Action[inputSource].onAxis += SteamVR_Behaviour_Vector3_OnAxis;

        }

 

        protected void RemoveHandlers(){

            if(vector3Action != null){

                vector3Action[inputSource].onUpdate -= SteamVR_Behaviour_Vector3_OnUpdate;

                vector3Action[inputSource].onChange -= SteamVR_Behaviour_Vector3_OnChange;

                vector3Action[inputSource].onAxis -= SteamVR_Behaviour_Vector3_OnAxis;

            }

        }

 

        private void SteamVR_Behaviour_Vector3_OnUpdate(SteamVR_Action_Vector3 fromAction, SteamVR_Input_Sources fromSource, Vector3 newAxis, Vector3 newDelta){}

        private void SteamVR_Behaviour_Vector3_OnChange(SteamVR_Action_Vector3 fromAction, SteamVR_Input_Sources fromSource, Vector3 newAxis, Vector3 newDelta){}

        private void SteamVR_Behaviour_Vector3_OnAxis(SteamVR_Action_Vector3 fromAction, SteamVR_Input_Sources fromSource, Vector3 newAxis, Vector3 newDelta){}

 

        //Gets the localized name of the device that the action corresponds to.(立钻哥哥:获取操做对应的设备的本地化名称.

        public string GetLocalizedName(params EVRInputStringBits[] localizedParts){}

 

        public delegate void AxisHandler(SteamVR_Behaviour_Vector3 fromAction, SteamVR_Input_Sources fromSource, Vector3 newAxis, Vector3 newDelta);

        public delegate void ChangeHandler(SteamVR_Behaviour_Vector3 fromAction, SteamVR_Input_Sources fromSource, Vector3 newAxis, Vector3 newDelta);

        public delegate void UpdateHandler(SteamVR_Behaviour_Vector3 fromAction, SteamVR_Input_Sources fromSource, Vector3 newAxis, Vector3 newDelta);

 

    }    //立钻哥哥:public class SteamVR_Behaviour_Vector3:MonoBehaviour{}

 

}    //立钻哥哥:namespace Valve.VR{}

 

 

 

 

###B.1.二、articles

###B.1.二、articles

++B.1.二、articles(文章)

++++立钻哥哥:https://valvesoftware.github.io/steamvr_unity_plugin/articles/intro.html

 

++Quickstart(快速入门)

++++立钻哥哥:Theres a quickstart guide here that will lead you through the process of getting setup with the SteamVR Unity Plugin and into a scene.(立钻哥哥:这里有一个快速入门指南,将带领你经过“SteamVr Unity插件”的安装过程进入一个场景.

 

++Render Models(渲染模型)

++++立钻哥哥:SteamVR works with a wide array of headsets and controllers. When you have a tracked device in VR its nice to have an accurate visualization of that device. Instead of shipping each individual model and texture for each controller with each application, SteamVR can manage this for you. We include a SteamVR_RenderModel component that you can put on a gameobject that will auto load whatever device SteamVR detects for a given Pose. Put a SteamVR_Behaviour_Pose on a gameobject to get the position and rotation of a controller and then a SteamVR_RenderModel to show the 3d model for that controller that will animate with button presses. See the simple sample scene or the SteamVR/Prefabs/CameraRig prefab for an example.(立钻哥哥:SteamVR与各类头盔和控制器配合使用。当你在VR中拥有一个被跟踪的设备时,拥有该设备的精确可视化效果是很好的。“SteamVR”能够为您管理这一点,而不是为每一个应用程序为每一个控制器提供每一个单独的模型和纹理。咱们包括了一个“SteamVR_RenderModel”组件,你能够把它放在一个gameobject(游戏对象)上,它会自动加载任何设备“SteamVR”检测到的给定姿式。在gameobject(游戏物体)上放置一个“steamvr_behavior _pose”来获取控制器的位置和旋转,而后是一个“SteamVR_RenderModel”来显示控制器的3d模型,该模型将经过按键来动画。参见简单的场景示例或“SteamVR/Prefabs/CameraRig”预制件做为示例。

 

++SteamVR Input(输入系统)

++++立钻哥哥:Since SteamVR works with so many different input devices weve simplified the process of accommodating all these devices. Instead of referencing the individual buttons on one controller, with SteamVR Input you reference an action. Instead of writing the code to recognize pulling the trigger button down 75% of the way to grab the block you can now just focus on the last bit of that, grab the block. You still configure the default for what grab means but the user can rebind it to their preference in a standard interface. And when a new input device comes out your users can publish bindings to share for that device with no code changes on your end.立钻哥哥:由于“SteamVR”能够与许多不一样的输入设备一块儿工做,因此咱们简化了容纳全部这些设备的过程。使用“SteamVR Input”引用一个动做,而不是引用一个控制器上的单个按钮。不须要编写代码来识别“在抓取物体的过程当中按下75%的触发按钮”,如今只需将注意力集中在最后一点上,即“抓取物体”。您仍然能够为“grab”的含义配置默认值,可是用户能够在标准界面中将其从新绑定到他们的首选项。当一个新的输入设备出现时,您的用户能够发布绑定来共享该设备,而不须要您更改代码。

 

++Skeleton Input(骨骼输入)

++++立钻哥哥:Inline with the Knuckles Valve has released a system to get skeletal hand data independent from the controller youre using. Some controllers have a high fidelity for hand tracking data with individual joints, some controllers only have buttons that we use to approximate joint data. We use whatever is available and give you two major sets of data: With Controller, Without Controller.立钻哥哥:内联的“Knuckles Valve”已经发布了一个系统,以得到骨骼手数据独立于你使用的控制器。有些控制器对单个关节的手部跟踪数据有很高的保真度,有些控制器只有咱们用来近似关节数据的按钮。咱们使用全部可用的数据,并给出两组主要的数据:“带控制器”和“不带控制器”。

++++[With Controller]: Our best approximation of where the joints in your hand are wrapped around your controller in the real world.立钻哥哥:[控制器]:咱们的最佳近似值,在现实世界中,您手中的关节是围绕在控制器周围的。

++++[Without Controller]:Based on the With Controller data we estimate how open or closed your hand is as if you were trying to hold your hand flat or make a fist.立钻哥哥:[不须要控制器]:基于“控制器”数据咱们估计打开或关闭你的手若是你试图持平或握拳紧握你的手。

++++Included in this plugin are example models of gloves that you can freely use in your products. In addition we have a helper component that takes the data from SteamVR and applies it to these gloves: SteamVR_Behaviour_Skeleton. For an example of this in action see the Interaction System sample scene.(立钻哥哥:这个插件包括手套的例子模型,你能够在你的产品中无偿使用。此外,咱们还有一个助手组件,它从“SteamVR”获取数据并将其应用于这些手套:“SteamVR_Behaviour_Skeleton”。有关实际操做的示例,请参见“交互系统”示例场景。

 

++Interaction System(交互系统)

++++立钻哥哥:After Valve released The Lab we took the learnings from that project and created an Interaction System that others could use in their own projects. This system has been updated since then to use SteamVR Input and the new SteamVR Skeleton Input systems. This system can serve as an example of how to use the these new systems. It includes the following examples.立钻哥哥:在“Valve”发布了“The Lab”以后,咱们吸收了该项目的经验,建立了一个“交互系统”,其余人能够在他们本身的项目中使用。从那时起,该系统已经更新为使用“SteamVR输入”和新的“SteamVR骨架输入”系统。这个系统能够做为如何使用这些新系统的一个例子。它包括如下示例。

++++[Interaction with Unity UI elements]:与Unity UI元素的交互;

++++[Pickup, Drop, and Throw]:拾起,放下,扔出去;

++++[Multiple variations on the throwing velocities]:投掷速度的多种变化;

++++[Bow and Arrow]:弓和箭

++++[Wheel interactions]:轮交互

++++[Proximity button]:接近按钮

++++[Variety of Skeleton Input example]:各类骨架输入示例;

++++[Teleporting]:传送

++++[Using held objects]:使用了对象

++++[Using Skeleton Input to form a hand around a held object]:使用骨架输入在被握物体周围造成一只手;

 

++Skeleton Poser(骨骼姿态)

++++立钻哥哥:The SteamVR_Skeleton_Poser script is designed to function independently form the SteamVR Interaction System and can be added to your own systems, but the SteamVR Interaction system works with it right out of the box and is a great way to quickly try it out.立钻哥哥:SteamVR_Skeleton_Poser”脚本被设计成独立于“SteamVR交互系统”运行,而且能够添加到您本身的系统中,可是“SteamVR交互系统”能够开箱即用地使用它,这是快速试用它的好方法。

 

 

 

 

 

###B.1.三、tutorials

###B.1.三、tutorials

++B.1.三、tutorials(教程)

++++立钻哥哥:These tutorials cover subjects specifically related to the SteamVR Unity Plugin. We have some basic tutorials now but if theres a specific component of the system youd like more information on please create an Issue on the github Issues page of the SteamVR Unity Plugin.立钻哥哥:这些教程涵盖了与“SteamVR Unity插件”相关的主题。咱们如今有一些基本的教程,但若是有一个特定的组件的系统,你想要更多的信息,请建立一个问题的github问题页面的“SteamVR Unity插件”。

++++https://valvesoftware.github.io/steamvr_unity_plugin/tutorials/intro.html

 

++Skeleton Poser(骨骼姿态)

++++立钻哥哥:The Skeleton Poser system has a straightforward purpose: when picking up physical objects, your in-game hands should morph to poses holding the objects. These rock solid poses can be authored and tweaked right in the Unity editor, for quick iteration as your game progresses. You can apply fancy effects on top of the poses such as additive per-finger animation and dynamic grips, and multi-pose blending.(立钻哥哥:[介绍)]:“Skeleton Poser系统”有一个简单的目的:当捡物理对象,你的游戏的手应该变形提出了对象。为快速迭代为您的游戏进展这些僵硬的姿式能够在“统一编辑器”编写和调整。您能够在姿态的顶部应用一些奇特的效果,好比添加每一个手指的动画和动态握把,以及多姿态混合。

++++https://valvesoftware.github.io/steamvr_unity_plugin/tutorials/Skeleton-Poser.html

 

++SteamVR Input(输入系统)

++++立钻哥哥:The VR ecosystem is growing every day and with Knuckles were adding quite a bit of potential to the space. SteamVR now needs to handle finger tracking and force sensors. This requires we take another look at how were handling input now, and how well handle it in the future. Joe Ludwig posted about the new SteamVR Input System a bit here(...). Now were going to dive into how you as a Unity developer can use this system to stop worrying about each new input device and focus on creating your virtual reality. Well start from the beginning with downloading the unity plugin, go through adding new actions, binding them, using them in the editor and code, and finally creating a build.立钻哥哥:VR生态系统天天都在增加,经过“Knuckles”,咱们为这个空间增长了很多潜力。SteamVR”如今须要处理手指跟踪和力传感器。这须要咱们从新审视咱们如今如何处理输入,以及未来如何处理它。乔·路德维希发布的新“SteamVR输入系统”(…)。如今,咱们将深刻探讨做为一个“Unity开发人员”,您如何使用这个系统进而不用担忧每一个新的输入设备,并专一于建立您的虚拟现实。咱们将从下载unity插件开始,经过添加新的操做,绑定它们,在编辑器和代码中使用它们,最后建立一个构建。

++++https://valvesoftware.github.io/steamvr_unity_plugin/tutorials/SteamVR-Input.html

 

 

 

 

 

 

 

##B.二、Quick Start

##B.二、Quick Start

++B.二、Quick Start

++++立钻哥哥:https://valvesoftware.github.io/steamvr_unity_plugin/articles/Quickstart.html

++++说明:这里立钻哥哥就开始调皮了,咱们就不继续了,那怎么办呢?==>新开一篇:以示例为中心进行拓展,这里的示例主要是官方示例,官网介绍为主;下面是新博文的连接,能够点击继续阅读

++++SteamVR2.2.0快速入门:

++++SteamVR2.2.0快速入门http://www.javashuo.com/article/p-fcmbsvpm-gb.html

 

 

 

++++SteamVR2.0开发指南http://www.javashuo.com/article/p-wgdghzsl-er.html

++++SteamVR2.2.0开发指南http://www.javashuo.com/article/p-hguaxolf-ew.html

++++SteamVR2.2.0快速入门http://www.javashuo.com/article/p-fcmbsvpm-gb.html

 

 

【XR游戏开发QQ群:784477094

++立钻哥哥推荐的拓展学习连接(Link_Url)

立钻哥哥推荐的拓展学习连接(Link_Url)

++++立钻哥哥Unity 学习空间: http://blog.csdn.net/VRunSoftYanlz/

++++HTC_VIVE开发基础http://www.javashuo.com/article/p-mhcdmelt-bt.html

++++Oculus杂谈http://www.javashuo.com/article/p-unmgvyjw-ce.html

++++Oculus安装使用http://www.javashuo.com/article/p-ulvvimkb-cr.html

++++SteamVR简介http://www.javashuo.com/article/p-awcwwcaq-ea.html

++++SteamVR脚本功能分析http://www.javashuo.com/article/p-ajqgwdev-ek.html

++++SteamVR2.0开发指南http://www.javashuo.com/article/p-wgdghzsl-er.html

++++SteamVR2.2.0开发指南http://www.javashuo.com/article/p-hguaxolf-ew.html

++++SteamVR/Extrashttp://www.javashuo.com/article/p-qrebqbra-he.html

++++SteamVR/Inputhttp://www.javashuo.com/article/p-avbvrjff-ga.html

++++OpenXR简介http://www.javashuo.com/article/p-qgsgcamr-eu.html

++++VRTK杂谈http://www.javashuo.com/article/p-gsryrkjk-eb.html

++++VRTK快速入门(杂谈)http://www.javashuo.com/article/p-bgvfnmia-cm.html

++++VRTK官方示例(目录)http://www.javashuo.com/article/p-dsnjffvq-ea.html

++++VRTK代码结构(目录)http://www.javashuo.com/article/p-wfilzqyd-es.html

++++VRTK(SceneResources)http://www.javashuo.com/article/p-ryptqvzl-hm.html

++++VRTK_ControllerEventshttp://www.javashuo.com/article/p-sciqvywx-hv.html

++++VRTK_InteractTouchhttp://www.javashuo.com/article/p-ggucvtwz-hq.html

++++虚拟现实行业应用http://www.javashuo.com/article/p-dtgguvvf-ec.html

++++VR实验:以太网帧的构成http://www.javashuo.com/article/p-fnfhdcgt-bp.html

++++实验四:存储器扩展实验http://www.javashuo.com/article/p-hutumxis-dd.html

++++FrameVR示例V0913http://www.javashuo.com/article/p-xnlrngai-cw.html

++++FrameVR示例V1003http://www.javashuo.com/article/p-ztazxpkv-bd.html

++++SwitchMachineV1022http://www.javashuo.com/article/p-tqkoklov-s.html

++++PlaySceneManagerV1022http://www.javashuo.com/article/p-tqkoklov-s.html

++++Unity5.x用户手册http://www.javashuo.com/article/p-ufnzpmga-s.html

++++Unity面试题ABChttp://www.javashuo.com/article/p-mwacxwca-gm.html

++++Unity面试题Dhttp://www.javashuo.com/article/p-wuwcrclr-s.html

++++Unity面试题Ehttp://www.javashuo.com/article/p-hmabbtmc-ba.html

++++Unity面试题Fhttp://www.javashuo.com/article/p-olslkfao-cq.html

++++Cocos2dx面试题http://www.javashuo.com/article/p-daozmsii-cz.html

++++禅道[zentao]http://www.javashuo.com/article/p-rqsvjwtk-cz.html

++++Lua快速入门篇(Xlua拓展):http://www.javashuo.com/article/p-rrszijom-cm.html

++++Lua快速入门篇(XLua教程):http://www.javashuo.com/article/p-pduvmusb-ho.html

++++Lua快速入门篇(基础概述)http://www.javashuo.com/article/p-shernvtt-u.html

++++框架知识点http://www.javashuo.com/article/p-eufbowgf-u.html

++++游戏框架(UI框架夯实篇)http://www.javashuo.com/article/p-cvemoigb-cu.html

++++游戏框架(初探篇)http://www.javashuo.com/article/p-zfpoilbc-hy.html

++++.Net框架设计http://www.javashuo.com/article/p-bvqhwwfm-cu.html

++++从零开始学架构http://www.javashuo.com/article/p-xbebwfbh-gd.html

++++设计模式简单整理http://www.javashuo.com/article/p-rngqugib-hg.html

++++专题:设计模式(精华篇)http://www.javashuo.com/article/p-nbohnaya-hw.html

++++U3D小项目参考https://blog.csdn.net/vrunsoftyanlz/article/details/80141811

++++Unity小游戏算法分析http://www.javashuo.com/article/p-stddpwad-eg.html

++++Unity案例(Vehicle)http://www.javashuo.com/article/p-wxnfscgy-dy.html

++++UML类图http://www.javashuo.com/article/p-sxberuew-bm.html

++++PowerDesigner简介http://www.javashuo.com/article/p-deknpwxv-cu.html

++++Unity知识点0001http://www.javashuo.com/article/p-ryvdxxjr-ep.html

++++Unity知识点0008http://www.javashuo.com/article/p-kxgstxls-gu.html

++++U3D_Shader编程(第一篇:快速入门篇)http://www.javashuo.com/article/p-kyppgrac-gz.html

++++U3D_Shader编程(第二篇:基础夯实篇)http://www.javashuo.com/article/p-qkyowtli-hv.html

++++Unity引擎基础http://www.javashuo.com/article/p-beommoeb-ka.html

++++Unity面向组件开发http://www.javashuo.com/article/p-eigmuvut-dt.html

++++Unity物理系统http://www.javashuo.com/article/p-nqvvciwv-kd.html

++++Unity2D平台开发http://www.javashuo.com/article/p-ycaagdtj-hs.html

++++UGUI基础http://www.javashuo.com/article/p-rukxwckw-mc.html

++++UGUI进阶http://www.javashuo.com/article/p-wcatruhq-gt.html

++++UGUI综合http://www.javashuo.com/article/p-dkccmqii-gg.html

++++Unity动画系统基础http://www.javashuo.com/article/p-mbrdouxy-dq.html

++++Unity动画系统进阶http://www.javashuo.com/article/p-aqaqpbkh-bp.html

++++Navigation导航系统http://www.javashuo.com/article/p-dswwllas-t.html

++++Unity特效渲染http://www.javashuo.com/article/p-ckojjyfj-bp.html

++++Unity数据存储http://www.javashuo.com/article/p-bvlzynso-m.html

++++Unity中Sqlite数据库http://www.javashuo.com/article/p-ejutsbxl-ca.html

++++WWW类和协程http://www.javashuo.com/article/p-dbwmhsav-cy.html

++++Unity网络http://www.javashuo.com/article/p-sqrlntgh-dw.html

++++Unity资源加密http://www.javashuo.com/article/p-qbtlzpck-bo.html

++++PhotonServer简介http://www.javashuo.com/article/p-cjotdrlu-z.html

++++编写Photon游戏服务器http://www.javashuo.com/article/p-mrqkaqlj-dn.html

++++C#事件http://www.javashuo.com/article/p-zmwruvql-gm.html

++++C#委托http://www.javashuo.com/article/p-uozpymaf-gh.html

++++C#集合http://www.javashuo.com/article/p-sfqfdqsf-ex.html

++++C#泛型http://www.javashuo.com/article/p-xrttqngo-ee.html

++++C#接口http://www.javashuo.com/article/p-vhlfplgv-dm.html

++++C#静态类https://blog.csdn.net/vrunsoftyanlz/article/details/78630979

++++C#中System.String类http://www.javashuo.com/article/p-olslkfao-cq.html

++++C#数据类型http://www.javashuo.com/article/p-hmabbtmc-ba.html

++++Unity3D默认的快捷键http://www.javashuo.com/article/p-wuwcrclr-s.html

++++游戏相关缩写http://www.javashuo.com/article/p-mwacxwca-gm.html

++++UnityAPI.Rigidbody刚体http://www.javashuo.com/article/p-phaztrtw-w.html

++++UnityAPI.Material材质http://www.javashuo.com/article/p-ntyoqcng-q.html

++++UnityAPI.Android安卓http://www.javashuo.com/article/p-fyyfgkck-q.html

++++UnityAPI.AndroidJNI安卓JNIhttp://www.javashuo.com/article/p-kvxjsnzf-w.html

++++UnityAPI.Transform变换http://www.javashuo.com/article/p-bfgrrhxl-cq.html

++++UnityAPI.WheelCollider轮碰撞器http://www.javashuo.com/article/p-smnaoooi-cn.html

++++UnityAPI.Resources资源http://www.javashuo.com/article/p-utqnokva-bu.html

++++JSON数据结构http://www.javashuo.com/article/p-dljbtddn-g.html

++++CocosStudio快速入门http://www.javashuo.com/article/p-qldbaqqa-v.html

++++Unity企业内训(目录)http://www.javashuo.com/article/p-oefbctlf-mn.html

++++Unity企业内训(第1讲)http://www.javashuo.com/article/p-ehlblkrj-mc.html

++++Unity企业内训(第2讲)http://www.javashuo.com/article/p-tiecmlwc-ma.html

++++Unity企业内训(第3讲)http://www.javashuo.com/article/p-mlpucjnv-ma.html

++++Unity企业内训(第4讲)http://www.javashuo.com/article/p-vfalurum-kz.html

++++Unity企业内训(第5讲)http://www.javashuo.com/article/p-ncrckqey-kv.html

++++Unity企业内训(第6讲)http://www.javashuo.com/article/p-gcrucvtb-ku.html

++++钻哥带您了解产品原型http://www.javashuo.com/article/p-hhgxuwjv-kt.html

++++插件<Obi Rope>http://www.javashuo.com/article/p-rmhegsmj-kr.html

++++计算机组成原理(教材篇)http://www.javashuo.com/article/p-sejaldpf-kr.html

++++5G接入:云计算和雾计算http://www.javashuo.com/article/p-yqdivhsk-km.html

++++云计算通俗讲义http://www.javashuo.com/article/p-rkzxxaay-mc.html

++++立钻哥哥Unity 学习空间: http://blog.csdn.net/VRunSoftYanlz/

--_--VRunSoft:lovezuanzuan--_--