{"id":290768,"date":"2018-10-15T00:05:16","date_gmt":"2018-10-14T20:05:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=290768"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2018-10-14T20:05:16","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=290768","title":{"rendered":"Unity &#038; Vive: Tutorial"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u0420\u0435\u0448\u0438\u043b \u0432 \u043e\u0442\u043f\u0443\u0441\u043a\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0434 Vive \u0432 Unity3D. \u041f\u043e\u0433\u0443\u0433\u043b\u0438\u043b <a href=\"https:\/\/www.raywenderlich.com\/792-htc-vive-tutorial-for-unity\">\u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/a> \u0438 \u043d\u0430\u0447\u0430\u043b \u043f\u0440\u043e\u0431\u044b\u0432\u0430\u0442\u044c, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041d\u0430\u0447\u0430\u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e Valve \u0432\u044b\u043a\u0430\u0442\u0438\u043b\u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 <a href=\"https:\/\/assetstore.unity.com\/packages\/tools\/integration\/steamvr-plugin-32647\">\u043f\u043b\u0430\u0433\u0438\u043d\u0430<\/a> \u0434\u043b\u044f Unity3D \u2014 \u043d\u043e\u0432\u0430\u044f, \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f. \u0412 \u043d\u0435\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0432\u0448\u0435\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0442\u0430\u0440\u044b\u0435 tutorial&#8217;\u044b \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438. \u0420\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rm\/jl\/tn\/rmjltnsb0fz_qjr8zcfkua1etbc.png\"><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f Unity &gt;= 5.4.0 \u0438 \u043d\u043e\u0432\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d <a href=\"https:\/\/assetstore.unity.com\/packages\/tools\/integration\/steamvr-plugin-32647\">SteamVR Plugin<\/a> (<a href=\"https:\/\/github.com\/ValveSoftware\/steamvr_unity_plugin\">GitHub<\/a>) <\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0430\u043c\u043e\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u0435 \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f pdf&#8217;\u043a\u0438<br \/>  \\Assets\\SteamVR\\SteamVR Unity Plugin.pdf<br \/>  \\Assets\\SteamVR\\SteamVR Unity Plugin \u2014 Input System.pdf<br \/>  \\Assets\\SteamVR\\InteractionSystem\\InteractionSystem.pdf<\/p>\n<p>  <\/p>\n<p>\u0418 \u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<br \/>  \\Assets\\SteamVR\\Simple Sample.unity<br \/>  \\Assets\\SteamVR\\InteractionSystem\\Samples\\Interactions_Example.unity<\/p>\n<p>  <\/p>\n<p>\u041f\u043b\u0430\u0433\u0438\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u2014 \u043e\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0448\u043b\u0435\u043c<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/c3QlSlrV-oU?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0448\u0430\u0433\u0430\u043c;<\/p>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443 3D \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c SteamVR Plugin<\/p>\n<p>  <\/li>\n<li>\n<p>\u0421\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u043c\u0441\u044f \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ym\/_k\/gx\/ym_kgxa2utdydn5fcfr0alskkni.png\">  <\/li>\n<li>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2014 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<br \/>  \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e Window\\SteamVR Imput<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xw\/zz\/ve\/xwzzvekrskjzxmkeiny8xfrejt4.png\">  <\/li>\n<li>\n<p>Unity \u0441\u043f\u0440\u043e\u0441\u0438\u0442 \u043f\u0440\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 actions.json \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u0430 (\u043e\u043d \u043b\u0435\u0436\u0438\u0442 \u0432 \\Assets\\SteamVR\\Input\\ExampleJSON) \u2014 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0441\u044f<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ew\/sq\/do\/ewsqdo0iqusr7xp5mcax_n7iyya.png\">  <\/p>\n<p>\u043f\u043e json-\u0444\u0430\u0439\u043b\u0430\u043c \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u043b\u0430\u0433\u0438\u043d \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 Vive, \u043d\u043e \u0438 \u043d\u0430 Oculus \u0438 Windows MR, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u044b knuckle. \u0421 \u044d\u0442\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/p>\n<p>  <\/li>\n<li>\n<p>\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c &#171;Save and generate&#187;<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8u\/vk\/cv\/8uvkcvq2xqw-jzwsz1s7orcf0vg.png\">  <\/li>\n<li>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0418\u0433\u0440\u043e\u043a\u0430 (Player \u0438\u0437 \\Assets\\SteamVR\\InteractionSystem\\Core\\Prefabs) \u0432 \u0421\u0446\u0435\u043d\u0443 \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c Main Camera<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ah\/ds\/sp\/ahdsspnpihou42ucg066czaowga.png\">  <\/p>\n<p>\u0447\u0442\u043e \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0440\u0435\u0436\u0438\u043c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u2014 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0451\u043d \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0418\u0433\u0440\u043e\u043a\u0430<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vt\/pt\/pt\/vtptpto2luzuhzgeet5ynkod30a.png\">  <\/p>\n<p>\u0435\u0449\u0451 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 \\Assets\\SteamVR\\InteractionSystem\\Core\\Icons \u0432 \\Assets \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 Gizmos<\/p>\n<p>  <\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c Play \u2014 \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u043b\u044c\u0448\u0438\u0432\u0430\u044f \u0440\u0443\u043a\u0430 \u0432 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0442 <a href=\"https:\/\/steamcommunity.com\/discussions\/forum\/0\/1732089092447847466\/\">\u0441\u044e\u0434\u0430<\/a> \u0438 \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 Player-&gt;NoSteamVRFallbackObjects-&gt;FallbackHand<\/p>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f \u0444\u0430\u043b\u044c\u0448\u0438\u0432\u043e\u0439 \u0440\u0443\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>using System.Collections;<br \/>  using System.Collections.Generic;<br \/>  using UnityEngine;<br \/>  using Valve.VR;<\/p>\n<p>  <\/p>\n<p>public class VrSimulatorHandFixer156: SteamVR_Behaviour_Pose<br \/>  {<br \/>  Valve.VR.InteractionSystem.Hand _hand;<br \/>  protected override void Start()<br \/>  {<\/p>\n<p>  <\/p>\n<pre><code>    base.Start();     _hand = this.gameObject.GetComponent&lt;Valve.VR.InteractionSystem.Hand&gt;();     _hand.handType = SteamVR_Input_Sources.RightHand;          GameObject broHand = GameObject.Instantiate(_hand.gameObject);         Destroy(broHand.GetComponent&lt;VrSimulatorHandFixer156&gt;());         broHand.SetActive(false);     _hand.otherHand = broHand.GetComponent&lt;Valve.VR.InteractionSystem.Hand&gt;();     _hand.otherHand.handType = SteamVR_Input_Sources.LeftHand;      var spoofMouse = new SpoofMouseAction();     _hand.grabGripAction = spoofMouse;     spoofMouse.InitializeDictionariesExposed(_hand.handType);      this.poseAction = new Poser_SteamVR_Action_Pose(); }  protected override void OnEnable() {  }  protected override void Update() {     _hand.grabGripAction.UpdateValue(SteamVR_Input_Sources.RightHand); }  protected override void OnDisable() { }  protected override void CheckDeviceIndex() { }  \/\/---------------------------------------------------------------------------------------------- class SpoofMouseAction : SteamVR_Action_Boolean {     public SpoofMouseAction()     {      }      public void InitializeDictionariesExposed(SteamVR_Input_Sources source)     {         try         {             InitializeDictionaries(source);         }         catch(System.Exception e)         {         }     }      protected override void InitializeDictionaries(SteamVR_Input_Sources source)     {         base.InitializeDictionaries(source);          onStateDown.Add(source, null);         onStateUp.Add(source, null);         actionData.Add(source, new InputDigitalActionData_t());         lastActionData.Add(source, new InputDigitalActionData_t());     }      public override void UpdateValue(SteamVR_Input_Sources inputSource)     {         lastActionData[inputSource] = actionData[inputSource];         tempActionData.bState = Input.GetMouseButton(0) || Input.GetMouseButtonDown(0);         tempActionData.bChanged = Input.GetMouseButtonDown(0) || Input.GetMouseButtonUp(0);         tempActionData.bActive = true;         \/\/tempActionData.fUpdateTime         \/\/tempActionData.act          actionData[inputSource] = tempActionData;         changed[inputSource] = tempActionData.bChanged;         active[inputSource] = tempActionData.bActive;         activeOrigin[inputSource] = tempActionData.activeOrigin;         updateTime[inputSource] = Time.time;\/\/ tempActionData.fUpdateTime;          if (changed[inputSource])             lastChanged[inputSource] = Time.time;          if (onStateDown[inputSource] != null &amp;&amp; GetStateDown(inputSource))             onStateDown[inputSource].Invoke(this);          if (onStateUp[inputSource] != null &amp;&amp; GetStateUp(inputSource))             onStateUp[inputSource].Invoke(this);          if (onChange[inputSource] != null &amp;&amp; GetChanged(inputSource))             onChange[inputSource].Invoke(this);          if (onUpdate[inputSource] != null)             onUpdate[inputSource].Invoke(this);          if (onActiveChange[inputSource] != null &amp;&amp; lastActionData[inputSource].bActive != active[inputSource])             onActiveChange[inputSource].Invoke(this, active[inputSource]);     } }     class Poser_SteamVR_Action_Pose : SteamVR_Action_Pose {     public override bool GetActive(SteamVR_Input_Sources inputSource)     {         return false;     } }   <\/code><\/pre>\n<p>  <\/p>\n<p>}<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 VR \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430\u0445 \u2014 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0434\u043d\u044b <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8o\/9k\/_7\/8o9k_7yyvp-0tpnb08c37nyupic.png\">  <\/p>\n<ol>\n<li>\n<p>\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 VR, \u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u043c. \u0412 \u043f\u043b\u0430\u0433\u0438\u043d\u0435 \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u0438<br \/>  \u0434\u043b\u044f \u0435\u0451 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0446\u0435\u043d\u0443 Teleporting \u0438\u0437 \\Assets\\SteamVR\\InteractionSystem\\Teleport\\Prefabs<br \/>  \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u0442\u044c TeleportPoint \u043e\u0442 \u0442\u0443\u0434\u0430 \u0436\u0435<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ni\/cg\/8d\/nicg8dadcjp39rkqunrz_kdxkhw.png\">  <\/p>\n<p>\u0422\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u0441\u044f \u043c\u043e\u0436\u043d\u043e \u0438 \u0432 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u2014 \u043a\u043b\u0430\u0432\u0438\u0448\u0435\u0439 T<\/p>\n<p>  <\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u0438 \u2014 \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c (plane) \u0438 \u0432\u0435\u0448\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0451 \u0441\u043a\u0440\u0438\u043f\u0442 TeleportArea.cs \u0438\u0437 \\Assets\\SteamVR\\InteractionSystem\\Teleport\\Scripts<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oj\/uj\/-g\/ojuj-gk3hi-i50oimezgg1ggzpk.png\">  <\/li>\n<li>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u2014 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c Cube \u0438 \u043f\u043e\u0432\u0435\u0441\u0438\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442 Interactable.cs \u0438\u0437 \\Assets\\SteamVR\\InteractionSystem\\Core\\Scripts<br \/>  \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u0441 \u043d\u0438\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4v\/fd\/2u\/4vfd2ukurnaecxadweqbwtdsyn8.png\">  <\/li>\n<li>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u2014 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f Cube \u043d\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442<\/p>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>using System.Collections;<br \/>  using System.Collections.Generic;<br \/>  using UnityEngine;<br \/>  using Valve.VR.InteractionSystem;<\/p>\n<p>  <\/p>\n<p>public class NewBehaviourScript: MonoBehaviour {<\/p>\n<p>  <\/p>\n<pre><code>private Hand.AttachmentFlags attachmentFlags = Hand.defaultAttachmentFlags &amp; (~Hand.AttachmentFlags.SnapOnAttach) &amp; (~Hand.AttachmentFlags.DetachOthers) &amp; (~Hand.AttachmentFlags.VelocityMovement);  private Interactable interactable;  \/\/ Use this for initialization void Start () {     interactable = this.GetComponent&lt;Interactable&gt;(); }  private void HandHoverUpdate(Hand hand) {     GrabTypes startingGrabType = hand.GetGrabStarting();     bool isGrabEnding = hand.IsGrabEnding(this.gameObject);      if (startingGrabType != GrabTypes.None)     {         \/\/ Call this to continue receiving HandHoverUpdate messages,         \/\/ and prevent the hand from hovering over anything else         hand.HoverLock(interactable);          \/\/ Attach this object to the hand         hand.AttachObject(gameObject, startingGrabType, attachmentFlags);     }     else if (isGrabEnding)     {         \/\/ Detach this object from the hand         hand.DetachObject(gameObject);          \/\/ Call this to undo HoverLock         hand.HoverUnlock(interactable);      } }<\/code><\/pre>\n<p>  <\/p>\n<p>}<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/a3XgijlclJ8?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043a \u043f\u043b\u0430\u0433\u0438\u043d\u0443, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \\Assets\\SteamVR\\InteractionSystem\\Samples\\Scripts\\InteractableExample.cs<\/p>\n<p>  <\/p>\n<p>\u0410 \u043c\u044b \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e, \u0447\u0435\u0433\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043d\u0435\u0442 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/p>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 Player.cs \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u044f<\/p>\n<p>  <\/p>\n<pre><code>[SteamVR_DefaultAction(\"PlayerMove\", \"default\")] public SteamVR_Action_Vector2 a_move;  [SteamVR_DefaultAction(\"PlayerRotate\", \"default\")] public SteamVR_Action_Vector2 a_rotate;  [SteamVR_DefaultAction(\"MenuClick\", \"default\")] public SteamVR_Action_Boolean a_menu;<\/code><\/pre>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \\Assets\\SteamVR\\Input<\/p>\n<p>  <\/p>\n<p>\u0418 \u043c\u0435\u0442\u043e\u0434 Update:<br \/>  private void Update()<br \/>  {<br \/>  bool st = a_menu.GetStateDown(SteamVR_Input_Sources.Any);<br \/>  if (st)<br \/>  {<br \/>  this.transform.position = new Vector3(0, 0, 0);<br \/>  }<br \/>  else<br \/>  {<br \/>  Camera camera = this.GetComponentInChildren();<br \/>  Quaternion cr = Quaternion.Euler(0, 0, 0);<br \/>  if (camera != null)<br \/>  {<br \/>  Vector2 r = a_rotate.GetAxis(SteamVR_Input_Sources.RightHand);<br \/>  Quaternion qp = this.transform.rotation;<br \/>  qp.eulerAngles += new Vector3(0, r.x, 0);<br \/>  this.transform.rotation = qp;<br \/>  cr = camera.transform.rotation;<br \/>  }<br \/>  Vector2 m = a_move.GetAxis(SteamVR_Input_Sources.LeftHand);<br \/>  m = Quaternion.Euler(0, 0, -cr.eulerAngles.y) * m;<br \/>  this.transform.position += new Vector3(m.x \/ 10, 0, m.y \/ 10);<br \/>  }<br \/>  }  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 Player.cs<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\/\/======= Copyright \u00a9 Valve Corporation, All rights reserved. ===============<br \/>  \/\/<br \/>  \/\/ Purpose: Player interface used to query HMD transforms and VR hands<br \/>  \/\/<br \/>  \/\/=============================================================================<\/p>\n<p>  <\/p>\n<p>using UnityEngine;<br \/>  using System.Collections;<br \/>  using System.Collections.Generic;<\/p>\n<p>  <\/p>\n<p>namespace Valve.VR.InteractionSystem<br \/>  {<br \/>  \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  \/\/ Singleton representing the local VR player\/user, with methods for getting<br \/>  \/\/ the player&#8217;s hands, head, tracking origin, and guesses for various properties.<br \/>  \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>  public class Player: MonoBehaviour<br \/>  {<br \/>  [Tooltip( &#171;Virtual transform corresponding to the meatspace tracking origin. Devices are tracked relative to this.&#187; )]<br \/>  public Transform trackingOriginTransform;<\/p>\n<p>  <\/p>\n<pre><code>    [Tooltip( \"List of possible transforms for the head\/HMD, including the no-SteamVR fallback camera.\" )]     public Transform[] hmdTransforms;      [Tooltip( \"List of possible Hands, including no-SteamVR fallback Hands.\" )]     public Hand[] hands;      [Tooltip( \"Reference to the physics collider that follows the player's HMD position.\" )]     public Collider headCollider;      [Tooltip( \"These objects are enabled when SteamVR is available\" )]     public GameObject rigSteamVR;      [Tooltip( \"These objects are enabled when SteamVR is not available, or when the user toggles out of VR\" )]     public GameObject rig2DFallback;      [Tooltip( \"The audio listener for this player\" )]     public Transform audioListener;      public bool allowToggleTo2D = true;      [SteamVR_DefaultAction(\"PlayerMove\", \"default\")]     public SteamVR_Action_Vector2 a_move;      [SteamVR_DefaultAction(\"PlayerRotate\", \"default\")]     public SteamVR_Action_Vector2 a_rotate;      [SteamVR_DefaultAction(\"MenuClick\", \"default\")]     public SteamVR_Action_Boolean a_menu;      \/\/-------------------------------------------------     \/\/ Singleton instance of the Player. Only one can exist at a time.     \/\/-------------------------------------------------     private static Player _instance;     public static Player instance     {         get         {             if ( _instance == null )             {                 _instance = FindObjectOfType&lt;Player&gt;();             }             return _instance;         }     }      \/\/-------------------------------------------------     \/\/ Get the number of active Hands.     \/\/-------------------------------------------------     public int handCount     {         get         {             int count = 0;             for ( int i = 0; i &lt; hands.Length; i++ )             {                 if ( hands[i].gameObject.activeInHierarchy )                 {                     count++;                 }             }             return count;         }     }      \/\/-------------------------------------------------     \/\/ Get the i-th active Hand.     \/\/     \/\/ i - Zero-based index of the active Hand to get     \/\/-------------------------------------------------     public Hand GetHand( int i )     {         for ( int j = 0; j &lt; hands.Length; j++ )         {             if ( !hands[j].gameObject.activeInHierarchy )             {                 continue;             }              if ( i &gt; 0 )             {                 i--;                 continue;             }              return hands[j];         }          return null;     }      \/\/-------------------------------------------------     public Hand leftHand     {         get         {             for ( int j = 0; j &lt; hands.Length; j++ )             {                 if ( !hands[j].gameObject.activeInHierarchy )                 {                     continue;                 }                  if ( hands[j].handType != SteamVR_Input_Sources.LeftHand)                 {                     continue;                 }                  return hands[j];             }              return null;         }     }      \/\/-------------------------------------------------     public Hand rightHand     {         get         {             for ( int j = 0; j &lt; hands.Length; j++ )             {                 if ( !hands[j].gameObject.activeInHierarchy )                 {                     continue;                 }                  if ( hands[j].handType != SteamVR_Input_Sources.RightHand)                 {                     continue;                 }                  return hands[j];             }              return null;         }     }      \/\/-------------------------------------------------     \/\/ Get Player scale. Assumes it is scaled equally on all axes.     \/\/-------------------------------------------------      public float scale     {         get         {             return transform.lossyScale.x;         }     }      \/\/-------------------------------------------------     \/\/ Get the HMD transform. This might return the fallback camera transform if SteamVR is unavailable or disabled.     \/\/-------------------------------------------------     public Transform hmdTransform     {         get         {             if (hmdTransforms != null)             {                 for (int i = 0; i &lt; hmdTransforms.Length; i++)                 {                     if (hmdTransforms[i].gameObject.activeInHierarchy)                         return hmdTransforms[i];                 }             }             return null;         }     }      \/\/-------------------------------------------------     \/\/ Height of the eyes above the ground - useful for estimating player height.     \/\/-------------------------------------------------     public float eyeHeight     {         get         {             Transform hmd = hmdTransform;             if ( hmd )             {                 Vector3 eyeOffset = Vector3.Project( hmd.position - trackingOriginTransform.position, trackingOriginTransform.up );                 return eyeOffset.magnitude \/ trackingOriginTransform.lossyScale.x;             }             return 0.0f;         }     }      \/\/-------------------------------------------------     \/\/ Guess for the world-space position of the player's feet, directly beneath the HMD.     \/\/-------------------------------------------------     public Vector3 feetPositionGuess     {         get         {             Transform hmd = hmdTransform;             if ( hmd )             {                 return trackingOriginTransform.position + Vector3.ProjectOnPlane( hmd.position - trackingOriginTransform.position, trackingOriginTransform.up );             }             return trackingOriginTransform.position;         }     }      \/\/-------------------------------------------------     \/\/ Guess for the world-space direction of the player's hips\/torso. This is effectively just the gaze direction projected onto the floor plane.     \/\/-------------------------------------------------     public Vector3 bodyDirectionGuess     {         get         {             Transform hmd = hmdTransform;             if ( hmd )             {                 Vector3 direction = Vector3.ProjectOnPlane( hmd.forward, trackingOriginTransform.up );                 if ( Vector3.Dot( hmd.up, trackingOriginTransform.up ) &lt; 0.0f )                 {                     \/\/ The HMD is upside-down. Either                     \/\/ -The player is bending over backwards                     \/\/ -The player is bent over looking through their legs                     direction = -direction;                 }                 return direction;             }             return trackingOriginTransform.forward;         }     }      \/\/-------------------------------------------------     void Awake()     {         SteamVR.Initialize(true); \/\/force openvr          if ( trackingOriginTransform == null )         {             trackingOriginTransform = this.transform;         }     }      \/\/-------------------------------------------------     private IEnumerator Start()     {         _instance = this;          while (SteamVR_Behaviour.instance.forcingInitialization)             yield return null;          if ( SteamVR.instance != null )         {             ActivateRig( rigSteamVR );         }         else         {<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"if-hide_debug_ui\">if !HIDE_DEBUG_UI<\/h1>\n<p>  <\/p>\n<pre><code>            ActivateRig( rig2DFallback );<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"endif\">endif<\/h1>\n<p>  <\/p>\n<pre><code>        }     }      private void Update()     {         bool st = a_menu.GetStateDown(SteamVR_Input_Sources.Any);         if (st)         {             this.transform.position = new Vector3(0, 0, 0);         }         else         {             Camera camera = this.GetComponentInChildren&lt;Camera&gt;();             Quaternion cr = Quaternion.Euler(0, 0, 0);             if (camera != null)             {                 Vector2 r = a_rotate.GetAxis(SteamVR_Input_Sources.RightHand);                 Quaternion qp = this.transform.rotation;                 qp.eulerAngles += new Vector3(0, r.x, 0);                 this.transform.rotation = qp;                 cr = camera.transform.rotation;             }             Vector2 m = a_move.GetAxis(SteamVR_Input_Sources.LeftHand);             m = Quaternion.Euler(0, 0, -cr.eulerAngles.y) * m;             this.transform.position += new Vector3(m.x \/ 10, 0, m.y \/ 10);         }     }      \/\/-------------------------------------------------     void OnDrawGizmos()     {         if ( this != instance )         {             return;         }          \/\/NOTE: These gizmo icons don't work in the plugin since the icons need to exist in a specific \"Gizmos\"         \/\/      folder in your Asset tree. These icons are included under Core\/Icons. Moving them into a         \/\/      \"Gizmos\" folder should make them work again.          Gizmos.color = Color.white;         Gizmos.DrawIcon( feetPositionGuess, \"vr_interaction_system_feet.png\" );          Gizmos.color = Color.cyan;         Gizmos.DrawLine( feetPositionGuess, feetPositionGuess + trackingOriginTransform.up * eyeHeight );          \/\/ Body direction arrow         Gizmos.color = Color.blue;         Vector3 bodyDirection = bodyDirectionGuess;         Vector3 bodyDirectionTangent = Vector3.Cross( trackingOriginTransform.up, bodyDirection );         Vector3 startForward = feetPositionGuess + trackingOriginTransform.up * eyeHeight * 0.75f;         Vector3 endForward = startForward + bodyDirection * 0.33f;         Gizmos.DrawLine( startForward, endForward );         Gizmos.DrawLine( endForward, endForward - 0.033f * ( bodyDirection + bodyDirectionTangent ) );         Gizmos.DrawLine( endForward, endForward - 0.033f * ( bodyDirection - bodyDirectionTangent ) );          Gizmos.color = Color.red;         int count = handCount;         for ( int i = 0; i &lt; count; i++ )         {             Hand hand = GetHand( i );              if ( hand.handType == SteamVR_Input_Sources.LeftHand)             {                 Gizmos.DrawIcon( hand.transform.position, \"vr_interaction_system_left_hand.png\" );             }             else if ( hand.handType == SteamVR_Input_Sources.RightHand)             {                 Gizmos.DrawIcon( hand.transform.position, \"vr_interaction_system_right_hand.png\" );             }             else             {                 \/*                 Hand.HandType guessHandType = hand.currentHandType;                  if ( guessHandType == Hand.HandType.Left )                 {                     Gizmos.DrawIcon( hand.transform.position, \"vr_interaction_system_left_hand_question.png\" );                 }                 else if ( guessHandType == Hand.HandType.Right )                 {                     Gizmos.DrawIcon( hand.transform.position, \"vr_interaction_system_right_hand_question.png\" );                 }                 else                 {                     Gizmos.DrawIcon( hand.transform.position, \"vr_interaction_system_unknown_hand.png\" );                 }                 *\/             }         }     }      \/\/-------------------------------------------------     public void Draw2DDebug()     {         if ( !allowToggleTo2D )             return;          if ( !SteamVR.active )             return;          int width = 100;         int height = 25;         int left = Screen.width \/ 2 - width \/ 2;         int top = Screen.height - height - 10;          string text = ( rigSteamVR.activeSelf ) ? \"2D Debug\" : \"VR\";          if ( GUI.Button( new Rect( left, top, width, height ), text ) )         {             if ( rigSteamVR.activeSelf )             {                 ActivateRig( rig2DFallback );             }             else             {                 ActivateRig( rigSteamVR );             }         }     }      \/\/-------------------------------------------------     private void ActivateRig( GameObject rig )     {         rigSteamVR.SetActive( rig == rigSteamVR );         rig2DFallback.SetActive( rig == rig2DFallback );          if ( audioListener )         {             audioListener.transform.parent = hmdTransform;             audioListener.transform.localPosition = Vector3.zero;             audioListener.transform.localRotation = Quaternion.identity;         }     }      \/\/-------------------------------------------------     public void PlayerShotSelf()     {         \/\/Do something appropriate here     } }<\/code><\/pre>\n<p>  <\/p>\n<p>}<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c Window\\SteamVR Imput, \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0448\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 \u043d\u0430\u0431\u043e\u0440\u0435 default \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0438\u0445, \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043d\u043a\u0442 &#171;Open binding UI&#187; (SteamVR \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0438 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 \u0432\u043a\u043b\u044e\u0447\u0451\u043d)<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sz\/eb\/ra\/szebrazqurampi5wkigsic_bore.png\">  <\/li>\n<li>\n<p>\u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432\u043a\u043b\u0430\u0434\u043a\u0430 Controller Binding \u2014 \u0432 \u043d\u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430\u043c\u0438: PlayerMove \u043c\u044b \u043f\u043e\u0432\u0435\u0441\u0438\u043c \u043d\u0430 \u043b\u0435\u0432\u044b\u0439 TRACKPAD (\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c Mirror Mode), PlayerRotate \u043d\u0430 \u043f\u0440\u0430\u0432\u044b\u0439 TRACKPAD, \u0430 MenuClick \u043f\u043e\u0432\u0435\u0441\u0438\u043c \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 Menu <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jb\/ee\/tn\/jbeetn4kfuahpgu1z5_lpg93f34.png\">  <\/li>\n<li>\n<p>\u0417\u0430\u043a\u0440\u043e\u0435\u043c Controller Binding \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/p>\n<p>  <\/li>\n<li>\n<p>\u0412 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 Player \u0441\u0432\u044f\u0436\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/t4\/fb\/g5\/t4fbg5homh_eun75ttkisq8acp4.png\">  <\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Play<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/04syOXGYGwA?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<h4 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 SteamVR Imput \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c Unity \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0434\u043e\u043b\u0433\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u043c\u0443 \u0432 \u043a\u043e\u0434, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Controller Binding \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u0440\u0430\u0432\u0438\u0442\u044c json-\u0444\u0430\u0439\u043b\u044b, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0438\u0441\u043a \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u043e\u0432\u0438\u0442\u044c.<br \/>  \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u2014 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u2014 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e ;=)<\/p>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/426357\/\"> https:\/\/habr.com\/post\/426357\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u0420\u0435\u0448\u0438\u043b \u0432 \u043e\u0442\u043f\u0443\u0441\u043a\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0434 Vive \u0432 Unity3D. \u041f\u043e\u0433\u0443\u0433\u043b\u0438\u043b <a href=\"https:\/\/www.raywenderlich.com\/792-htc-vive-tutorial-for-unity\">\u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/a> \u0438 \u043d\u0430\u0447\u0430\u043b \u043f\u0440\u043e\u0431\u044b\u0432\u0430\u0442\u044c, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041d\u0430\u0447\u0430\u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e Valve \u0432\u044b\u043a\u0430\u0442\u0438\u043b\u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 <a href=\"https:\/\/assetstore.unity.com\/packages\/tools\/integration\/steamvr-plugin-32647\">\u043f\u043b\u0430\u0433\u0438\u043d\u0430<\/a> \u0434\u043b\u044f Unity3D \u2014 \u043d\u043e\u0432\u0430\u044f, \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f. \u0412 \u043d\u0435\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0432\u0448\u0435\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0442\u0430\u0440\u044b\u0435 tutorial&#8217;\u044b \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438. \u0420\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rm\/jl\/tn\/rmjltnsb0fz_qjr8zcfkua1etbc.png\"><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-290768","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=290768"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290768\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}