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

《SteamVR2.2.0开发指南》

《SteamVR2.2.0开发指南》

版本

作者

参与者

完成日期

备注

SteamVR2.2.0_Guide_V01_1.0

严立钻

 

2019.03.22

 

 

 

 

 

 

 

 

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

++++“SteamVR2.2.0开发指南”:是对“SteamVR2.2.0”的入门指导;(2019年度的重点技术突破点确立为:“SteamVR”)(前面已经有了一个“V2.0”开发指南了:https://blog.csdn.net/VRunSoftYanlz/article/details/86618187,但是SteamVR更新到了V2.2.0,感觉是一个大版本,好吧,那就再补充一篇:V2.2.0)

++++“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开发指南https://blog.csdn.net/VRunSoftYanlz/article/details/88784527

++++SteamVR2.2.0快速入门https://blog.csdn.net/VRunSoftYanlz/article/details/88833579

++++SteamVR2.2.0交互系统https://blog.csdn.net/VRunSoftYanlz/article/details/89199778

++++SteamVR2.2.0传送机制https://blog.csdn.net/VRunSoftYanlz/article/details/89390866

++++SteamVR2.2.0官方教程https://blog.csdn.net/VRunSoftYanlz/article/details/89324067

 

 

##《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开发指南:https://blog.csdn.net/VRunSoftYanlz/article/details/86618187

++++上面的链接是关于“SteamVR2.0”介绍的,可以先看一下;

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

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

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

##A.1、V2.2.0前言

##A.1、V2.2.0前言

++A.1、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开发指南https://blog.csdn.net/VRunSoftYanlz/article/details/86618187

++++SteamVR2.2.0开发指南https://blog.csdn.net/VRunSoftYanlz/article/details/88784527

++++SteamVR2.2.0快速入门https://blog.csdn.net/VRunSoftYanlz/article/details/88833579

++++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.2、V2.2.0版本说明

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

++A.2、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、Vector2、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.1、Documentation

++++B.2、Quick Start

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

##B.1、Documentation

##B.1、Documentation

++B.1、Documentation

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

++++B.1.1、API level documentation

++++B.1.2、articles

++++B.1.3、tutorials

###B.1.1、API level documentation

###B.1.1、API level documentation

++B.1.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.2、articles

###B.1.2、articles

++B.1.2、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.3、tutorials

###B.1.3、tutorials

++B.1.3、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.2、Quick Start

##B.2、Quick Start

++B.2、Quick Start

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

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

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

++++SteamVR2.2.0快速入门https://blog.csdn.net/VRunSoftYanlz/article/details/88833579

++++SteamVR2.0开发指南https://blog.csdn.net/VRunSoftYanlz/article/details/86618187

++++SteamVR2.2.0开发指南https://blog.csdn.net/VRunSoftYanlz/article/details/88784527

++++SteamVR2.2.0快速入门https://blog.csdn.net/VRunSoftYanlz/article/details/88833579

 

【XR游戏开发QQ群:784477094

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

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

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

++++HTC_VIVE开发基础https://blog.csdn.net/VRunSoftYanlz/article/details/81989970

++++Oculus杂谈https://blog.csdn.net/VRunSoftYanlz/article/details/82469850

++++Oculus安装使用https://blog.csdn.net/VRunSoftYanlz/article/details/82718982

++++SteamVR简介https://blog.csdn.net/VRunSoftYanlz/article/details/86484254

++++SteamVR脚本功能分析https://blog.csdn.net/VRunSoftYanlz/article/details/86531480

++++SteamVR2.0开发指南https://blog.csdn.net/VRunSoftYanlz/article/details/86618187

++++SteamVR2.2.0开发指南https://blog.csdn.net/VRunSoftYanlz/article/details/88784527

++++SteamVR/Extrashttps://blog.csdn.net/VRunSoftYanlz/article/details/86584108

++++SteamVR/Inputhttps://blog.csdn.net/VRunSoftYanlz/article/details/86601950

++++OpenXR简介https://blog.csdn.net/VRunSoftYanlz/article/details/85726365

++++VRTK杂谈https://blog.csdn.net/VRunSoftYanlz/article/details/82562993

++++VRTK快速入门(杂谈)https://blog.csdn.net/VRunSoftYanlz/article/details/82955267

++++VRTK官方示例(目录)https://blog.csdn.net/VRunSoftYanlz/article/details/82955410

++++VRTK代码结构(目录)https://blog.csdn.net/VRunSoftYanlz/article/details/82780085

++++VRTK(SceneResources)https://blog.csdn.net/VRunSoftYanlz/article/details/82795400

++++VRTK_ControllerEventshttps://blog.csdn.net/VRunSoftYanlz/article/details/83099512

++++VRTK_InteractTouchhttps://blog.csdn.net/VRunSoftYanlz/article/details/83120220

++++虚拟现实行业应用https://blog.csdn.net/VRunSoftYanlz/article/details/88360157

++++VR实验:以太网帧的构成https://blog.csdn.net/VRunSoftYanlz/article/details/82598140

++++实验四:存储器扩展实验https://blog.csdn.net/VRunSoftYanlz/article/details/87834434

++++FrameVR示例V0913https://blog.csdn.net/VRunSoftYanlz/article/details/82808498

++++FrameVR示例V1003https://blog.csdn.net/VRunSoftYanlz/article/details/83066516

++++SwitchMachineV1022https://blog.csdn.net/VRunSoftYanlz/article/details/83280886

++++PlaySceneManagerV1022https://blog.csdn.net/VRunSoftYanlz/article/details/83280886

++++Unity5.x用户手册https://blog.csdn.net/VRunSoftYanlz/article/details/81712741

++++Unity面试题ABChttps://blog.csdn.net/vrunsoftyanlz/article/details/78630687

++++Unity面试题Dhttps://blog.csdn.net/VRunSoftYanlz/article/details/78630838

++++Unity面试题Ehttps://blog.csdn.net/vrunsoftyanlz/article/details/78630913

++++Unity面试题Fhttps://blog.csdn.net/VRunSoftYanlz/article/details/78630945

++++Cocos2dx面试题https://blog.csdn.net/VRunSoftYanlz/article/details/78630967

++++禅道[zentao]https://blog.csdn.net/VRunSoftYanlz/article/details/83964057

++++Lua快速入门篇(Xlua拓展):https://blog.csdn.net/VRunSoftYanlz/article/details/81173818

++++Lua快速入门篇(XLua教程):https://blog.csdn.net/VRunSoftYanlz/article/details/81141502

++++Lua快速入门篇(基础概述)https://blog.csdn.net/VRunSoftYanlz/article/details/81041359

++++框架知识点https://blog.csdn.net/VRunSoftYanlz/article/details/80862879

++++游戏框架(UI框架夯实篇)https://blog.csdn.net/vrunsoftyanlz/article/details/80781140

++++游戏框架(初探篇)https://blog.csdn.net/VRunSoftYanlz/article/details/80630325

++++.Net框架设计https://blog.csdn.net/VRunSoftYanlz/article/details/87401225

++++从零开始学架构https://blog.csdn.net/VRunSoftYanlz/article/details/88095895

++++设计模式简单整理https://blog.csdn.net/vrunsoftyanlz/article/details/79839641

++++专题:设计模式(精华篇)https://blog.csdn.net/VRunSoftYanlz/article/details/81322678

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

++++Unity小游戏算法分析https://blog.csdn.net/VRunSoftYanlz/article/details/87908365

++++Unity案例(Vehicle)https://blog.csdn.net/VRunSoftYanlz/article/details/82355876

++++UML类图https://blog.csdn.net/vrunsoftyanlz/article/details/80289461

++++PowerDesigner简介https://blog.csdn.net/VRunSoftYanlz/article/details/86500084

++++Unity知识点0001https://blog.csdn.net/vrunsoftyanlz/article/details/80302012

++++Unity知识点0008https://blog.csdn.net/VRunSoftYanlz/article/details/81153606

++++U3D_Shader编程(第一篇:快速入门篇)https://blog.csdn.net/vrunsoftyanlz/article/details/80372071

++++U3D_Shader编程(第二篇:基础夯实篇)https://blog.csdn.net/vrunsoftyanlz/article/details/80372628

++++Unity引擎基础https://blog.csdn.net/vrunsoftyanlz/article/details/78881685

++++Unity面向组件开发https://blog.csdn.net/vrunsoftyanlz/article/details/78881752

++++Unity物理系统https://blog.csdn.net/vrunsoftyanlz/article/details/78881879

++++Unity2D平台开发https://blog.csdn.net/vrunsoftyanlz/article/details/78882034

++++UGUI基础https://blog.csdn.net/vrunsoftyanlz/article/details/78884693

++++UGUI进阶https://blog.csdn.net/vrunsoftyanlz/article/details/78884882

++++UGUI综合https://blog.csdn.net/vrunsoftyanlz/article/details/78885013

++++Unity动画系统基础https://blog.csdn.net/vrunsoftyanlz/article/details/78886068

++++Unity动画系统进阶https://blog.csdn.net/vrunsoftyanlz/article/details/78886198

++++Navigation导航系统https://blog.csdn.net/vrunsoftyanlz/article/details/78886281

++++Unity特效渲染https://blog.csdn.net/vrunsoftyanlz/article/details/78886403

++++Unity数据存储https://blog.csdn.net/vrunsoftyanlz/article/details/79251273

++++Unity中Sqlite数据库https://blog.csdn.net/vrunsoftyanlz/article/details/79254162

++++WWW类和协程https://blog.csdn.net/vrunsoftyanlz/article/details/79254559

++++Unity网络https://blog.csdn.net/vrunsoftyanlz/article/details/79254902

++++Unity资源加密https://blog.csdn.net/VRunSoftYanlz/article/details/87644514

++++PhotonServer简介https://blog.csdn.net/VRunSoftYanlz/article/details/86652770

++++编写Photon游戏服务器https://blog.csdn.net/VRunSoftYanlz/article/details/86682935

++++C#事件https://blog.csdn.net/vrunsoftyanlz/article/details/78631267

++++C#委托https://blog.csdn.net/vrunsoftyanlz/article/details/78631183

++++C#集合https://blog.csdn.net/vrunsoftyanlz/article/details/78631175

++++C#泛型https://blog.csdn.net/vrunsoftyanlz/article/details/78631141

++++C#接口https://blog.csdn.net/vrunsoftyanlz/article/details/78631122

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

++++C#中System.String类https://blog.csdn.net/vrunsoftyanlz/article/details/78630945

++++C#数据类型https://blog.csdn.net/vrunsoftyanlz/article/details/78630913

++++Unity3D默认的快捷键https://blog.csdn.net/vrunsoftyanlz/article/details/78630838

++++游戏相关缩写https://blog.csdn.net/vrunsoftyanlz/article/details/78630687

++++UnityAPI.Rigidbody刚体https://blog.csdn.net/VRunSoftYanlz/article/details/81784053

++++UnityAPI.Material材质https://blog.csdn.net/VRunSoftYanlz/article/details/81814303

++++UnityAPI.Android安卓https://blog.csdn.net/VRunSoftYanlz/article/details/81843193

++++UnityAPI.AndroidJNI安卓JNIhttps://blog.csdn.net/VRunSoftYanlz/article/details/81879345

++++UnityAPI.Transform变换https://blog.csdn.net/VRunSoftYanlz/article/details/81916293

++++UnityAPI.WheelCollider轮碰撞器https://blog.csdn.net/VRunSoftYanlz/article/details/82356217

++++UnityAPI.Resources资源https://blog.csdn.net/VRunSoftYanlz/article/details/83155518

++++JSON数据结构https://blog.csdn.net/VRunSoftYanlz/article/details/82026644

++++CocosStudio快速入门https://blog.csdn.net/VRunSoftYanlz/article/details/82356839

++++Unity企业内训(目录)https://blog.csdn.net/VRunSoftYanlz/article/details/82634668

++++Unity企业内训(第1讲)https://blog.csdn.net/VRunSoftYanlz/article/details/82634733

++++Unity企业内训(第2讲)https://blog.csdn.net/VRunSoftYanlz/article/details/82861180

++++Unity企业内训(第3讲)https://blog.csdn.net/VRunSoftYanlz/article/details/82927699

++++Unity企业内训(第4讲)https://blog.csdn.net/VRunSoftYanlz/article/details/83479776

++++Unity企业内训(第5讲)https://blog.csdn.net/VRunSoftYanlz/article/details/83963811

++++Unity企业内训(第6讲)https://blog.csdn.net/VRunSoftYanlz/article/details/84207696

++++钻哥带您了解产品原型https://blog.csdn.net/VRunSoftYanlz/article/details/87303828

++++插件<Obi Rope>https://blog.csdn.net/VRunSoftYanlz/article/details/83963905

++++计算机组成原理(教材篇)https://blog.csdn.net/VRunSoftYanlz/article/details/82719129

++++5G接入:云计算和雾计算https://blog.csdn.net/VRunSoftYanlz/article/details/88372718

++++云计算通俗讲义https://blog.csdn.net/VRunSoftYanlz/article/details/88652803

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

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

发布了130 篇原创文章 · 获赞 149 · 访问量 16万+

猜你喜欢

转载自blog.csdn.net/VRunSoftYanlz/article/details/88784527