<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VR アーカイブ - Sheltie&#039;s Garage</title>
	<atom:link href="https://sheltie-garage.xyz/category/%E3%82%B2%E3%83%BC%E3%83%A0/vr/feed/" rel="self" type="application/rss+xml" />
	<link>https://sheltie-garage.xyz/category/ゲーム/vr/</link>
	<description>趣味に生きる</description>
	<lastBuildDate>Tue, 04 Jan 2022 08:17:02 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://sheltie-garage.xyz/wp-content/uploads/2018/04/cropped-L927xrpq-32x32.jpg</url>
	<title>VR アーカイブ - Sheltie&#039;s Garage</title>
	<link>https://sheltie-garage.xyz/category/ゲーム/vr/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Unity VR PCディスプレイに第三者カメラを表示</title>
		<link>https://sheltie-garage.xyz/2022/01/unity-vr-pc%e3%83%87%e3%82%a3%e3%82%b9%e3%83%97%e3%83%ac%e3%82%a4%e3%81%ab%e7%ac%ac%e4%b8%89%e8%80%85%e3%82%ab%e3%83%a1%e3%83%a9%e3%82%92%e8%a1%a8%e7%a4%ba/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Tue, 04 Jan 2022 08:17:02 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=3094</guid>

					<description><![CDATA[<p>Unity VR開発で、PCディスプレイにはHMDではなく、別カメラの映像を表示したいということがよくあります。以下の方法でPCディスプレイには別カメラ映像を表示することが可能です。 プロジェクトセットアップ 今回の環境 [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2022/01/unity-vr-pc%e3%83%87%e3%82%a3%e3%82%b9%e3%83%97%e3%83%ac%e3%82%a4%e3%81%ab%e7%ac%ac%e4%b8%89%e8%80%85%e3%82%ab%e3%83%a1%e3%83%a9%e3%82%92%e8%a1%a8%e7%a4%ba/">Unity VR PCディスプレイに第三者カメラを表示</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>Unity VR開発で、PCディスプレイにはHMDではなく、別カメラの映像を表示したいということがよくあります。<br>以下の方法でPCディスプレイには別カメラ映像を表示することが可能です。</p>



<h2 class="wp-block-heading">プロジェクトセットアップ</h2>



<p>今回の環境は以下の通りです</p>



<ul class="wp-block-list"><li>Windows11</li><li>HTC Vive</li><li>Unity 2020.3.25f</li><li>SteamVR 2.7.3</li></ul>



<p>まずはプロジェクトを作成してSteamVRプラグインを取り込みます</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-2.png"><img fetchpriority="high" decoding="async" width="1024" height="550" src="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-2-1024x550.png" alt="" class="wp-image-3095" srcset="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-2-1024x550.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-2-300x161.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-2-768x413.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-2-1536x826.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-2.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>SteamVR PluginからCamera Rigを設定します</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="547" src="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-3-1024x547.png" alt="" class="wp-image-3096" srcset="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-3-1024x547.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-3-300x160.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-3-768x410.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-3-1536x820.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-3.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>動きが分かりやすいように、CameraRig配下のleft、right、cameraに適当なオブジェクトを設定しておきます</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="547" src="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-4-1024x547.png" alt="" class="wp-image-3097" srcset="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-4-1024x547.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-4-300x160.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-4-768x410.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-4-1536x820.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-4.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>最初から配置されているMain Cameraを変更していきます。<br>好きな位置に移動したのち、以下のプロパティを変更します</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="461" height="596" src="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-5.png" alt="" class="wp-image-3098" srcset="https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-5.png 461w, https://sheltie-garage.xyz/wp-content/uploads/2022/01/Image-5-232x300.png 232w" sizes="auto, (max-width: 461px) 100vw, 461px" /></figure>



<p>Depthのプロパティを1、具体的にはHMD側のCameraのDepthプロパティより大きい値を指定することでPCディスプレイ側にはMain Camera側(Depthが大きいほう)が優先されて表示されます。<br>もちろん、HMDにはHMD側のカメラの映像が表示されます。<br>Target EyeはNoneを指定します。</p>



<h2 class="wp-block-heading">以上</h2>



<p>ひとまずPCディスプレイにHMD以外のカメラ映像を表示する場合、上記の設定だけで実現することができます。<br>アバターなどを利用するゲームの場合、プレイヤーにはHMDの映像を、PCディスプレイには他カメラの映像を映すことでVRゲームを遊ぶ人、遊んでいる人を見てる人、両方とも楽しめるゲームが作れるかもしれませんね</p>



<a href="https://www.amazon.co.jp/Oculus-899-00183-02-Quest-2%E2%80%94%E5%AE%8C%E5%85%A8%E3%83%AF%E3%82%A4%E3%83%A4%E3%83%AC%E3%82%B9%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%AB%E3%82%A4%E3%83%B3%E3%83%AF%E3%83%B3VR%E3%83%98%E3%83%83%E3%83%89%E3%82%BB%E3%83%83%E3%83%88%E2%80%94128GB/dp/B09B9F7439?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&#038;crid=38ZWRKFCEI1RZ&#038;keywords=VR&#038;qid=1641284031&#038;sprefix=vr%2Caps%2C176&#038;sr=8-7&#038;linkCode=li2&#038;tag=monodon-22&#038;linkId=84a1b93fc4120eb10c80286fa343d241&#038;language=ja_JP&#038;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" border="0" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&#038;ASIN=B09B9F7439&#038;Format=_SL160_&#038;ID=AsinImage&#038;MarketPlace=JP&#038;ServiceVersion=20070822&#038;WS=1&#038;tag=monodon-22&#038;language=ja_JP" ></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&#038;language=ja_JP&#038;l=li2&#038;o=9&#038;a=B09B9F7439" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
<a href="https://www.amazon.co.jp/Oculus-899-00183-02-Quest-2%E2%80%94%E5%AE%8C%E5%85%A8%E3%83%AF%E3%82%A4%E3%83%A4%E3%83%AC%E3%82%B9%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%AB%E3%82%A4%E3%83%B3%E3%83%AF%E3%83%B3VR%E3%83%98%E3%83%83%E3%83%89%E3%82%BB%E3%83%83%E3%83%88%E2%80%94128GB/dp/B09B9F7439?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&#038;crid=38ZWRKFCEI1RZ&#038;keywords=VR&#038;qid=1641284031&#038;sprefix=vr%2Caps%2C176&#038;sr=8-7&#038;linkCode=li2&#038;tag=monodon-22&#038;linkId=84a1b93fc4120eb10c80286fa343d241&#038;language=ja_JP&#038;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" border="0" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&#038;ASIN=B09B9F7439&#038;Format=_SL160_&#038;ID=AsinImage&#038;MarketPlace=JP&#038;ServiceVersion=20070822&#038;WS=1&#038;tag=monodon-22&#038;language=ja_JP" ></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&#038;language=ja_JP&#038;l=li2&#038;o=9&#038;a=B09B9F7439" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
<a href="https://www.amazon.co.jp/HTC-VIVE-Pro-Eye-%E3%82%A2%E3%83%83%E3%83%97%E3%82%B0%E3%83%AC%E3%83%BC%E3%83%89%E3%82%AD%E3%83%83%E3%83%88/dp/B07RPPDJSN?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&#038;crid=38ZWRKFCEI1RZ&#038;keywords=VR&#038;qid=1641284031&#038;sprefix=vr%2Caps%2C176&#038;sr=8-50&#038;linkCode=li2&#038;tag=monodon-22&#038;linkId=da7097921b222c204d06f948c136cdb0&#038;language=ja_JP&#038;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" border="0" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&#038;ASIN=B07RPPDJSN&#038;Format=_SL160_&#038;ID=AsinImage&#038;MarketPlace=JP&#038;ServiceVersion=20070822&#038;WS=1&#038;tag=monodon-22&#038;language=ja_JP" ></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&#038;language=ja_JP&#038;l=li2&#038;o=9&#038;a=B07RPPDJSN" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />



<p></p>



<p></p>
<p>投稿 <a href="https://sheltie-garage.xyz/2022/01/unity-vr-pc%e3%83%87%e3%82%a3%e3%82%b9%e3%83%97%e3%83%ac%e3%82%a4%e3%81%ab%e7%ac%ac%e4%b8%89%e8%80%85%e3%82%ab%e3%83%a1%e3%83%a9%e3%82%92%e8%a1%a8%e7%a4%ba/">Unity VR PCディスプレイに第三者カメラを表示</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>VRM アバター設定を行ってみる</title>
		<link>https://sheltie-garage.xyz/2021/03/vrm-%e3%82%a2%e3%83%90%e3%82%bf%e3%83%bc%e8%a8%ad%e5%ae%9a%e3%82%92%e8%a1%8c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Wed, 10 Mar 2021 10:01:35 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2598</guid>

					<description><![CDATA[<p>boothで以前購入した「幽狐族のお姉様」ですが、諸事情により眠らせていました。BeatSaber購入を機にVRゲームプレイを動画に取りたいと思い、アバターとしてこちらのキャラクターを利用することにしました。 幽狐族のお [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2021/03/vrm-%e3%82%a2%e3%83%90%e3%82%bf%e3%83%bc%e8%a8%ad%e5%ae%9a%e3%82%92%e8%a1%8c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b/">VRM アバター設定を行ってみる</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>boothで以前購入した「<a href="https://armadillon.booth.pm/items/1484117" target="_blank" rel="noreferrer noopener">幽狐族のお姉様</a>」ですが、諸事情により眠らせていました。<br>BeatSaber購入を機にVRゲームプレイを動画に取りたいと思い、アバターとしてこちらのキャラクターを利用することにしました。</p>



<h2 class="wp-block-heading">幽狐族のお姉様はVRM未同梱！</h2>



<p>アバターは「Virtual Motion Capture(ばきゃも)」というソフトを利用することにしました。BeatSaberと相性が良く、セットアップも簡単だったので「<a rel="noreferrer noopener" href="https://booth.pm/ja/items/1777704" target="_blank">アルディナ</a>」さんのVRMを取り込んだら、すぐにVRゲームの動作を作ることができました</p>



<p>ただ、幽狐族のお姉様はVRMが同梱されていないため、ばきゃもで使うことができません。<br>そこで、VRM公式マニュアルを参考に、幽狐族のお姉様のVRMファイルを作成してみることにしました</p>



<h2 class="wp-block-heading">作成環境</h2>



<p>環境は以下の通り<br>・Unity 2020 2.7f1<br>・UniVRM <a href="https://github.com/vrm-c/UniVRM/releases/tag/v0.66.0">v0.66.0</a><br>作業手順は<a rel="noreferrer noopener" href="https://vrm.dev/how_to_make_vrm/" target="_blank">公式マニュアル</a>に書かれているため、手順通りに進めていきます。</p>



<h2 class="wp-block-heading">幽狐族のお姉様をVRMで出力</h2>



<p>幽狐族のお姉様のVRM作成手順を紹介します</p>



<h3 class="wp-block-heading">付属のfbxファイルをVRMとして出力</h3>



<p>必須パッケージを読み込みます。<br>・「幽弧族のお姉様」のUnityPackageを読み込む<br>・UniVRM Ver0.66を読み込む</p>



<p>読み込みが完了すると「幽弧さん」フォルダとVRM0のメニューが追加されます</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-4.png"><img loading="lazy" decoding="async" width="1024" height="555" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-4-1024x555.png" alt="" class="wp-image-2600" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-4-1024x555.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-4-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-4-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-4-1536x832.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-4.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>VRM出力設定を行います<br>・「幽弧さん」フォルダのmodel.fbxをシーンに配置する<br>・「幽弧さん」フォルダのMaterialsのシェーダーをすべて「MToon」に変更する</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-5.png"><img loading="lazy" decoding="async" width="1024" height="556" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-5-1024x556.png" alt="" class="wp-image-2601" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-5-1024x556.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-5-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-5-768x417.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-5-1536x834.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-5.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>・UnityメニューのVRM0をクリックし、VRMエクスポート画面を表示する<br>・Title、Version、Authorの項目を入力し、Exportボタンを押す</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-6.png"><img loading="lazy" decoding="async" width="1024" height="556" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-6-1024x556.png" alt="" class="wp-image-2602" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-6-1024x556.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-6-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-6-768x417.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-6-1536x834.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-6.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>ここまでの作業でVRMファイルが作成されます</p>



<h3 class="wp-block-heading">ばきゃもに取り込み、動作確認</h3>



<p>VRMファイルをばきゃもに取り込みキャリブレーションを行えば、アバターとして利用することができます</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-8.png"><img loading="lazy" decoding="async" width="1024" height="514" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-8-1024x514.png" alt="" class="wp-image-2603" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-8-1024x514.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-8-300x151.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-8-768x386.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-8-1536x772.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-8.png 1676w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>ただ、この状態では揺れ物や瞬きなどの設定は一切含まれていないため、単純に体の動きとキャラクターの動きが連動するだけになります。<br>次はVRMに揺れ物や表情を付ける作業を行います</p>



<h2 class="wp-block-heading">幽狐族のお姉様のVRMに各種設定を行う</h2>



<h3 class="wp-block-heading">揺れ物の設定</h3>



<p>VRMを出力すると、VRMファイルと一緒にプレハブも生成されます。<br>プレハブをUnityのシーンに取り込み、各種設定を行います。</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-10.png"><img loading="lazy" decoding="async" width="1024" height="555" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-10-1024x555.png" alt="" class="wp-image-2605" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-10-1024x555.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-10-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-10-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-10-1536x832.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-10.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>揺れ物は「secondary」というオブジェクトにスクリプトがアタッチされていて、そこに対して設定を入れ込みます。<br>幽弧さんの場合、合計20個揺れ物を設定しました</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-11.png"><img loading="lazy" decoding="async" width="1024" height="555" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-11-1024x555.png" alt="" class="wp-image-2608" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-11-1024x555.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-11-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-11-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-11-1536x832.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-11.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Unityの再生ボタンを押せば、揺れ物がどのように動くか確認することができます</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="661" height="520" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/20210310_001.gif" alt="" class="wp-image-2607"/></figure>



<h3 class="wp-block-heading">揺れ物の当たり判定の設定</h3>



<p>このままではスカートが体を突き抜けてしまうので、揺れ物用の当たり判定を付けます。<br>マニュアルによると、当たり判定を設定したいボーンに「<a rel="noreferrer noopener" href="https://vrm.dev/docs/univrm/springbone/univrm_secondary/#%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3vrmspringbonecollidergroup%E5%BD%93%E3%81%9F%E3%82%8A%E5%88%A4%E5%AE%9A" target="_blank">VRMSpringBoneColliderGroup</a>」スクリプトをアタッチすればよいとのことでした</p>



<p>幽子さんは以下のように設定してみました。<br>紫が当たり判定、黄色が揺れ物制御用の当たり判定となります</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-15.png"><img loading="lazy" decoding="async" width="1024" height="555" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-15-1024x555.png" alt="" class="wp-image-2609" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-15-1024x555.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-15-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-15-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-15-1536x832.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-15.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>合計8か所のボーンに当たり判定を組み込みました</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="554" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-16-1024x554.png" alt="" class="wp-image-2610" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-16-1024x554.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-16-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-16-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-16-1536x831.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-16.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">表情の設定</h3>



<p><a href="https://vrm.dev/docs/univrm/blendshape/univrm_blendshape/" target="_blank" rel="noreferrer noopener">マニュアル</a>に沿って設定を行っていきます</p>



<p>VRM Blend Shape Proxyに設定されている「Blend Shape Avator」の設定を行います</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-17.png"><img loading="lazy" decoding="async" width="1024" height="554" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-17-1024x554.png" alt="" class="wp-image-2613" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-17-1024x554.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-17-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-17-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-17-1536x831.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-17.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Blend Shape Avatorを開くと、それぞれの表情に対応するボタンがあるので、一つ一つ設定していきます<br>(例えば、Aなら口を開けた表情 など)</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-18.png"><img loading="lazy" decoding="async" width="1024" height="554" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-18-1024x554.png" alt="" class="wp-image-2614" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-18-1024x554.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-18-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-18-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-18-1536x831.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-18.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>ブレンドシェイプのプレビューはインスペクター下部のプレビューエリアで確認できます</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-19.png"><img loading="lazy" decoding="async" width="1024" height="554" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-19-1024x554.png" alt="" class="wp-image-2615" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-19-1024x554.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-19-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-19-768x415.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-19-1536x830.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-19.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>新規で表情を追加する場合は「Create Blend Shape Clip」をクリックします</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-20.png"><img loading="lazy" decoding="async" width="1024" height="555" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-20-1024x555.png" alt="" class="wp-image-2616" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-20-1024x555.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-20-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-20-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-20-1536x833.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-20.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading">視線の設定を行う</h3>



<p>視線の確認用に、視線のターゲットとなるオブジェクト、頭のボーンを設定することで視線の確認が行えます</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-21.png"><img loading="lazy" decoding="async" width="1024" height="555" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-21-1024x555.png" alt="" class="wp-image-2618" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-21-1024x555.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-21-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-21-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-21-1536x832.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-21.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h2 class="wp-block-heading">設定内容の確認を行う</h2>



<p>Unityのプレイボタンをクリックし、動作を確認していきます<br>・モデルを動かせば、揺れ物の確認ができます<br>・視線確認用のターゲットオブジェクトを動かすと、視線の確認ができます<br>・VRM Blend Shape Proxyの設定を変えると、表情の確認ができます</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="584" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/20210310_002-1024x584.gif" alt="" class="wp-image-2619" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/20210310_002-1024x584.gif 1024w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/20210310_002-300x171.gif 300w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/20210310_002-768x438.gif 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">以上</h2>



<p>はじめての作業だったため、半日ほどかかりましたがひとまずVRMアバターを作成することができました。<br>これを使用すれば、VRM対応アプリに読み込ませることができるので活用方法が広がりますね。</p>



<p>ばきゃもに取り込むとこんな感じで動きます</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1275" height="715" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/20210310_003.gif" alt="" class="wp-image-2621"/></figure>



<figure class="wp-block-video"><video controls src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/20210303_004.mp4"></video></figure>



<p>boothではいろいろなアバターが販売されていますが、幽弧さんのようにVRMファイルが付属しないモデルもあります。そんな時にVRMファイルの作成方法を知っておけば、活用方法も広がるのではと思います。</p>



<a href="https://www.amazon.co.jp/Fantom-VRM-Live-Viewer/dp/B083Y4QZRW?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VRM&amp;qid=1615370399&amp;sr=8-7&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=a13fa3d45c7e6b7e68f00ce55b2ac52b&amp;language=ja_JP&amp;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B083Y4QZRW&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B083Y4QZRW" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E5%85%A5%E9%96%80Blender2-9-%E3%82%BC%E3%83%AD%E3%81%8B%E3%82%89%E5%A7%8B%E3%82%81%E3%82%8B3D%E5%88%B6%E4%BD%9C-%E4%BC%8A%E4%B8%B9-%E3%82%B7%E3%82%B2%E3%83%A6%E3%82%AD/dp/479806128X?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VRM&amp;qid=1615370415&amp;rnid=2321267051&amp;s=books&amp;sr=1-2&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=e191fef27b72ad70dc959681b52f5f4e&amp;language=ja_JP&amp;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=479806128X&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=479806128X" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/VR%E3%81%AE%E3%81%99%E3%81%94%E3%81%95%EF%BD%9E30%E4%BB%A3%E3%81%AE%E4%BC%9A%E7%A4%BE%E5%93%A1%E3%81%8C1%E5%B9%B4%E9%96%93%E6%B2%A1%E9%A0%AD%E3%81%97%E3%81%A6%E8%A6%8B%E3%81%88%E3%81%9F%E3%81%93%E3%81%A8%EF%BD%9E-%E3%82%82%E3%81%A3%E3%81%A8%E5%A4%9A%E3%81%8F%E3%81%AE%E4%BA%BA%E3%81%ABVR%E3%82%92%E7%9F%A5%E3%81%A3%E3%81%A6%E3%82%82%E3%82%89%E3%81%84%E3%81%9F%E3%81%84%EF%BC%81-%E3%81%B2%E3%82%89%E5%90%89VR%E3%83%96%E3%83%83%E3%82%AF%E3%82%B9-%E3%81%B2%E3%82%89%E5%90%89-HIRAKICHI-ebook/dp/B08JGL3TMY?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VRM&amp;qid=1615370415&amp;rnid=2321267051&amp;s=books&amp;sr=1-8&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=1e9accd0043afa1a3bffe618c529ad58&amp;language=ja_JP&amp;ref_=as_li_ss_il" target="_blank" rel="noopener"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08JGL3TMY&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08JGL3TMY" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<p>投稿 <a href="https://sheltie-garage.xyz/2021/03/vrm-%e3%82%a2%e3%83%90%e3%82%bf%e3%83%bc%e8%a8%ad%e5%ae%9a%e3%82%92%e8%a1%8c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b/">VRM アバター設定を行ってみる</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		<enclosure url="https://sheltie-garage.xyz/wp-content/uploads/2021/03/20210303_004.mp4" length="3763347" type="video/mp4" />

			</item>
		<item>
		<title>[SteamVR] No pose action set for this component</title>
		<link>https://sheltie-garage.xyz/2021/03/steamvr-no-pose-action-set-for-this-component/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Wed, 03 Mar 2021 13:07:20 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2557</guid>

					<description><![CDATA[<p>SteamVRで開発していて、上記エラーが起こってしまったため備忘録 解決方法 先に解決方法を書いておくと、「CameraRig」プレハブのAction Pose欄がNoneになっていたのが原因でした。プレハブ側の設定に [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2021/03/steamvr-no-pose-action-set-for-this-component/">[SteamVR] No pose action set for this component</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>SteamVRで開発していて、上記エラーが起こってしまったため備忘録</p>



<h2 class="wp-block-heading">解決方法</h2>



<p>先に解決方法を書いておくと、「CameraRig」プレハブのAction Pose欄がNoneになっていたのが原因でした。<br>プレハブ側の設定に、Action Poseを設定してやることで解決しました。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="639" height="386" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-12.png" alt="" class="wp-image-2558" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-12.png 639w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-12-300x181.png 300w" sizes="auto, (max-width: 639px) 100vw, 639px" /></figure>



<h2 class="wp-block-heading">経緯</h2>



<p>SteamVRアプリを作っていて、シーン変更を行うとコントローラのAction Poseが取得できないというエラーが発生しました。エラーメッセージは</p>



<p><em>[SteamVR] No pose action set for this component</em></p>



<p>というもの。</p>



<p>アプリのシーン構成は「タイトル画面」「ゲーム画面」の2つのシーンからなるシンプルなもので、ゲーム画面からタイトル画面に戻るとエラーが発生しました。<br>厄介なのは、初回起動時のタイトル画面ではエラーは発生せず、ゲーム画面から戻ってきたときのみ発生するというものです。</p>



<h2 class="wp-block-heading">原因</h2>



<p>おそらく「SteamVR Input」の設定画面で各種ボタンの構成を作り直したので、この時にプレハブからアクションの設定が抜け落ちてしまったようです。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="705" height="467" src="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-13.png" alt="" class="wp-image-2559" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-13.png 705w, https://sheltie-garage.xyz/wp-content/uploads/2021/03/Image-13-300x199.png 300w" sizes="auto, (max-width: 705px) 100vw, 705px" /></figure>



<p>解決方法に書いた通り、「<strong><span class="has-inline-color has-vivid-red-color">CameraRigプレハブ</span></strong>」のコントローラに正しくAction Poseを設定することで解決できました。ヒエラルキービューのインスタンスではなく、プレハブ側に設定を入れてやる必要があります。</p>



<h2 class="wp-block-heading">以上</h2>



<p>SteamVRはまだまだ動きがつかみきれないので、いったんエラーが発生すると原因究明と対応が面倒ですね・・・<br>Unityアセットの「VR Interaction Framework」を購入してみたので、次回からはこちらのフレームワークを使う予定<br>これでVR開発の効率が上がればよいが・・・</p>



<iframe src="https://assetstore.unity.com/linkmaker/embed/package/161066/widget-wide?aid=1101l3Jco" style="width:600px; height:130px; border:0px;"></iframe>
<p>投稿 <a href="https://sheltie-garage.xyz/2021/03/steamvr-no-pose-action-set-for-this-component/">[SteamVR] No pose action set for this component</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>最悪のタイミングでoculus rift sを購入した話</title>
		<link>https://sheltie-garage.xyz/2021/01/%e6%9c%80%e6%82%aa%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%9f%e3%83%b3%e3%82%b0%e3%81%a7oculus-rift-s%e3%82%92%e8%b3%bc%e5%85%a5%e3%81%97%e3%81%9f%e8%a9%b1/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Sun, 31 Jan 2021 01:14:52 +0000</pubDate>
				<category><![CDATA[VR]]></category>
		<category><![CDATA[ガジェット]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2461</guid>

					<description><![CDATA[<p>先日oculus rift sを購入したのですが、タイミングが最悪だったので悔しさを紛らわすために書いてます どこも横並びな価格 新品でoculus rift sを購入すると5万円半ばということもあり、さすがに無理という [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2021/01/%e6%9c%80%e6%82%aa%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%9f%e3%83%b3%e3%82%b0%e3%81%a7oculus-rift-s%e3%82%92%e8%b3%bc%e5%85%a5%e3%81%97%e3%81%9f%e8%a9%b1/">最悪のタイミングでoculus rift sを購入した話</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>先日<a href="https://www.oculus.com/rift-s/?locale=ja_JP" target="_blank" rel="noreferrer noopener">oculus rift s</a>を購入したのですが、タイミングが最悪だったので悔しさを紛らわすために書いてます</p>



<h2 class="wp-block-heading">どこも横並びな価格</h2>



<p>新品でoculus rift sを購入すると5万円半ばということもあり、さすがに無理ということで中古を購入することに。<br>主にヤフオクに張り付いて動向を見ていましたが、おおよそ3万円前後で取引されていました。<br>試しにメルカリも見てみたら、最低2万円半ばから出品されており、こちらも候補に入れることにしました。<br>他、中古サイトでも3万円で販売しているところがあり、結局どの販売チャネルを使っても同じじゃないか？という結論に・・・<br>ということで、今回はサクっと購入できるメルカリで3万円の物を購入することにしました。</p>



<h2 class="wp-block-heading">直近で大幅値下げされていたRift S</h2>



<p>週末会社の同僚と話しており、「oculus rift s 買ったぜ～」みたいな話をしていて、Google検索しながら話していた時、公式ページの価格が29800円になっていて、あれ？　違う商品かなと思いつつ内容を確認してみても、やっぱりRift Sで間違いなく、なんでこんなに安いのだろうと疑問に思ってました。</p>



<p>公式アナウンスは見つけられなかったのですが、どうやら大幅値下げが敢行されたらしく、一気に29800円に値段が下がったようです。<a rel="noreferrer noopener" href="https://amzn.to/3cpMu5z" target="_blank">Amazon</a>でも税抜き29800円で売られていました<br>自分がメルカリで購入したのが1月26日早朝、値下げが行われたのは1月25日の様子・・・</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="658" height="704" src="https://sheltie-garage.xyz/wp-content/uploads/2021/01/Image-4.png" alt="" class="wp-image-2462" srcset="https://sheltie-garage.xyz/wp-content/uploads/2021/01/Image-4.png 658w, https://sheltie-garage.xyz/wp-content/uploads/2021/01/Image-4-280x300.png 280w" sizes="auto, (max-width: 658px) 100vw, 658px" /></figure>



<h2 class="wp-block-heading">もう本当に最悪です</h2>



<p>ということで、値下げに気づかずoculus rift sを購入してしまったようで、事実を知った時はかなりショックでした。このブログに恨みつらみを書き綴るくらいにはショックでした・・・<br>幸い、メルカリで税込定価より少々安く購入できたこと、購入したものが思いのほかきれいだったので良かったですが、ヤフオクで「使用感あり、付属品欠品」のような商品も3万円くらいで購入されていたのを見ると、もうね・・・　心中お察しします・・・</p>



<h2 class="wp-block-heading">価格調査は大事</h2>



<p>購入直前まで価格調査は必要ですね・・・　今回はずっとoculus rift sは5万円台と思い込んでいたので、3万円前後で購入できるヤフオクやメルカリで購入したほうが絶対お得と思い込んでしまいました。<br>次中古品を購入するときは、事前の価格調査を徹底！を心掛けたいと思います。<br>そういう仕組み、何か作れないかなぁ・・・</p>



<p class="has-vivid-red-color has-text-color has-huge-font-size"><strong>oculus、今回のことは絶対忘れないからな～</strong></p>
<p>投稿 <a href="https://sheltie-garage.xyz/2021/01/%e6%9c%80%e6%82%aa%e3%81%ae%e3%82%bf%e3%82%a4%e3%83%9f%e3%83%b3%e3%82%b0%e3%81%a7oculus-rift-s%e3%82%92%e8%b3%bc%e5%85%a5%e3%81%97%e3%81%9f%e8%a9%b1/">最悪のタイミングでoculus rift sを購入した話</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unity + SteamVR SDKチュートリアル Part6</title>
		<link>https://sheltie-garage.xyz/2020/12/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part6/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Sun, 13 Dec 2020 14:04:40 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2382</guid>

					<description><![CDATA[<p>日が開いてしまいましたが、Unity + SteamVRのチュートリアルを進めていきます。今回は移動できる場所にマーカーを表示し、実際に移動を行うところまで作成します。今回でこのチュートリアルは終了します。最後まで、どう [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2020/12/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part6/">Unity + SteamVR SDKチュートリアル Part6</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>日が開いてしまいましたが、Unity + SteamVRのチュートリアルを進めていきます。<br>今回は移動できる場所にマーカーを表示し、実際に移動を行うところまで作成します。<br>今回でこのチュートリアルは終了します。最後まで、どうぞお付き合いをよろしくお願いいたします。</p>



<p>以下のチュートリアルの「Moving Around」のパートになります<br><a rel="noreferrer noopener" href="https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity" target="_blank">https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity</a></p>



<h2 class="wp-block-heading">テレポート処理の作成</h2>



<p>移動可能な場所にマーカーを表示できるように改修します。<br>マーカーはすでに準備されているため、実際に設定を行うときに改めて紹介します。</p>



<p>今回はLaserPointer.csに改修を加えていきます。<br>全体像は後ほど紹介しますが、大まかに以下の改修を加えていきます。</p>



<ul class="wp-block-list"><li>テレポートに使用する各種変数の準備</li><li>レイヤーマスクの追加</li><li>マーカーの表示ON/OFF作成</li><li>移動処理</li><li>オフセット設定</li></ul>



<p>やることは多くありますが、確実に設定していきましょう</p>



<h2 class="wp-block-heading">改修済みソース内容</h2>



<p>今回のチュートリアルで作成するLaserPointer.csの完成内容です。<br>処理内容はそれぞれのコメントを参照してください。</p>



<pre class="crayon-plain-tag">// LaserPointer.cs
using UnityEngine;
using Valve.VR;

public class LaserPointer : MonoBehaviour
{
    public SteamVR_Input_Sources handType;
    public SteamVR_Behaviour_Pose controllerPose;
    public SteamVR_Action_Boolean teleportAction;

    public GameObject laserPrefab;      // レーザーオブジェクトのプレハブを保存

    public Transform cameraRigTransform;        // カメラリグのトランスフォーム
    public GameObject teleportReticlePrefab;    // レーザーポインタのマーカー保存用
    public Transform headTransform;             // プレイヤーカメラへの参照
    public Vector3 teleportReticleOffset;       // マーカー表示位置調整用
    public LayerMask teleportMask;              // テレポート可能範囲のレイヤーマスク
    
    private GameObject laser;           // 作成したレーザーインスタンスの保存
    private Transform laserTransform;   // 
    private Vector3 hitPoint;           // レーザーがヒットしたポジションを保存
    
    private GameObject reticle;                 // マーカーへの参照
    private Transform teleportReticleTransform; // マーカーを利用しやすいように加工したもの
    private bool shoudTeleport;                 // テレポート可能な場合true


    // Start is called before the first frame update
    void Start()
    {
        // プレハブからレーザーインスタンスを新規作成
        laser = Instantiate(laserPrefab);
        // トランスフォーム情報を保存
        laserTransform = laser.transform;

        // テレポート用の変数を初期化
        reticle = Instantiate(teleportReticlePrefab);
        teleportReticleTransform = reticle.transform;
    }

    // Update is called once per frame
    void Update()
    {
        // テレポートアクションが行われた場合
        // (動き的にはテレポートボタンが押されている場合)
        if (teleportAction.GetState(handType))
        {
            RaycastHit hit;

            // コントローラから例を飛ばし、ヒットした場合はhitに内容を保存する
            // teleportMaskを指定することで、テレポート可能な場所を指定する
            if (Physics.Raycast(controllerPose.transform.position, transform.forward, out hit, 100, teleportMask))
            {
                hitPoint = hit.point;
                ShowLaser(hit);

                // テレポート可能エリアにヒットした場合、
                // マーカーをON
                // テレポート位置の設定
                // フラグをtrueに変更
                reticle.SetActive(true);
                teleportReticleTransform.position = hitPoint + teleportReticleOffset;
                shoudTeleport = true;
            }
        }
        else // レイがヒットしていない場合、レーザーオブジェクトとマーカーの表示を消す
        {
            laser.SetActive(false);
            reticle.SetActive(false);
        }

        // テレポートボタンが離された かつ テレポート可能な時
        if (teleportAction.GetStateUp(handType) &amp;amp;&amp;amp; shoudTeleport)
        {
            Teleport();
        }
    }

    private void ShowLaser(RaycastHit hit)
    {
        // レーザーを表示
        laser.SetActive(true);
        // コントローラとレイがヒットしたポイントの間にレーザーオブジェクトを配置
        // Leapを利用する理由は、0.5を指定することで、2点間の中間にオブジェクトを配置することができるから
        laserTransform.position = Vector3.Lerp(controllerPose.transform.position, hitPoint, 0.5f);
        // レイがヒットした方向にレーザーオブジェクトを向ける
        laserTransform.LookAt(hitPoint);
        // レイがヒットした位置に合わせて、レーザーオブジェクトの大きさを変える
        laserTransform.localScale = new Vector3(laserTransform.localScale.x,
                                                laserTransform.localScale.y,
                                                hit.distance);
    }

    private void Teleport()
    {
        // ここに来た時点でテレポートは進行中なので、フラグはfalseにしておく
        shoudTeleport = false;
        // マーカーの表示も消す
        reticle.SetActive(false);
        // カメラリグとプレイヤーの頭(メインカメラ)の位置を計算する
        // カメラリグとプレイヤーの頭の位置を計算しないと、移動位置がずれたように感じられてしまう
        // ここはチュートリアル元の図解を見ていただいたほうがわかりやすい
        // https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity#toc-anchor-009
        Vector3 difference = cameraRigTransform.position - headTransform.position;

        // 計算したy座標を0に。ここでは平面上のずれのみ計算したいので、yの値は08ずれ無し)にしておく
        difference.y = 0;

        // 計算した座標をもとにカメラリグを移動する
        cameraRigTransform.position = hitPoint + difference;
    }
}</pre>



<h2 class="wp-block-heading">Teleportの各種設定</h2>



<p>まずはテレポート用のレイヤーマスクが設定されているか確認してください。<br>(なぜか自分の環境では抜けていた・・・)<br>追加方法はInspectorのLayerからAddLayer&#8230; を選択し、追加します</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="410" height="220" src="https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-1.png" alt="" class="wp-image-2383" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-1.png 410w, https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-1-300x161.png 300w" sizes="auto, (max-width: 410px) 100vw, 410px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="323" height="334" src="https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-2.png" alt="" class="wp-image-2384" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-2.png 323w, https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-2-290x300.png 290w" sizes="auto, (max-width: 323px) 100vw, 323px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="540" height="270" src="https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-3.png" alt="" class="wp-image-2385" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-3.png 540w, https://sheltie-garage.xyz/wp-content/uploads/2020/12/Image-3-300x150.png 300w" sizes="auto, (max-width: 540px) 100vw, 540px" /></figure>



<p>次に修正したスクリプトに対して、各種設定を施します。<br>具体的には、以下のGifアニメを参照してください</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="641" height="602" src="https://sheltie-garage.xyz/wp-content/uploads/2020/12/20201213_001.gif" alt="" class="wp-image-2386"/></figure>



<h2 class="wp-block-heading">動作確認</h2>



<p>以上でテレポート処理が実装されれました。これでVR空間を自由に動き回ることができるはずです。<br>動作確認を行いましょう</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1257" height="676" src="https://sheltie-garage.xyz/wp-content/uploads/2020/12/20201213_002.gif" alt="" class="wp-image-2388"/></figure>



<p>問題なければVR空間内を自由に移動し、オブジェクトもつかむことができるはずです。<br>これで、このチュートリアルで取り扱う内容は終了です。お疲れさまでした!</p>



<h2 class="wp-block-heading">以上</h2>



<p>以上でSteamVRのチュートリアルは終了です。SteamVRは2系で入力システムが大幅に変わりましたが、今回のチュートリアルを通して大まかな概要が理解できたのではないでしょうか？<br>また、「物をつかむ」「移動する」ということができるようになっただけで、VR空間内でいろいろできそうな気がしませんか？</p>



<p>今回のチュートリアルがお役に立てば幸いです。また、オリジナルのチュートリアル作者の方に感謝です!</p>



<a href="https://www.amazon.co.jp/HTC-%E3%80%90%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E5%93%81%E3%80%91HTC-VIVE-Cosmos-Elite/dp/B08644DH8F/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-1&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=386f545e4bf5e66e3ff56ce1be2f5a68&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08644DH8F&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08644DH8F" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%80%90%E6%AD%A3%E8%A6%8F%E8%BC%B8%E5%85%A5%E5%93%81%E3%80%91Oculus-Rift-%E3%82%AA%E3%82%AD%E3%83%A5%E3%83%A9%E3%82%B9-%E3%83%AA%E3%83%95%E3%83%88-%E3%82%A8%E3%82%B9/dp/B07QLRRQB3/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-13&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=1e28ae6ce5eb94eb4c692adf4aa35e38&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B07QLRRQB3&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B07QLRRQB3" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%83%9F%E3%83%A9%E3%82%A4%E3%82%92%E3%81%A4%E3%81%8F%E3%82%8D%E3%81%86%EF%BC%81-VR%E3%81%A7%E7%B4%A1%E3%81%90%E3%83%90%E3%83%BC%E3%83%81%E3%83%A3%E3%83%AB%E5%89%B5%E4%B8%96%E8%A8%98-GOROman-ebook/dp/B088LV7TV6/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VR&amp;qid=1600004835&amp;s=books&amp;sr=1-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=d0849d42c58c76f109c4b3fc9222cb77&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B088LV7TV6&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B088LV7TV6" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0"><a href="https://www.amazon.co.jp/Oculus-Quest-2%E2%80%94%E5%AE%8C%E5%85%A8%E3%83%AF%E3%82%A4%E3%83%A4%E3%83%AC%E3%82%B9%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%AB%E3%82%A4%E3%83%B3%E3%83%AF%E3%83%B3VR%E3%83%98%E3%83%83%E3%83%89%E3%82%BB%E3%83%83%E3%83%88%E2%80%94256GB/dp/B08GCMGBCB/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;crid=2WUXNXTJ1M9G0&amp;dchild=1&amp;keywords=oculus+quest+2&amp;qid=1603031413&amp;sprefix=ocu,aps,269&amp;sr=8-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=c0e675f1d1bb6441941c883d69972dec&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08GCMGBCB&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08GCMGBCB" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<p>投稿 <a href="https://sheltie-garage.xyz/2020/12/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part6/">Unity + SteamVR SDKチュートリアル Part6</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unity + SteamVR SDKチュートリアル Part5</title>
		<link>https://sheltie-garage.xyz/2020/11/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part5/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Sun, 15 Nov 2020 09:17:39 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2369</guid>

					<description><![CDATA[<p>今回からテレポーテーションの作成に入っていきますが、まずは事前準備を進めます。以下のチュートリアルの「Making A Laser Pointer」のパートになりますhttps://www.raywenderlich.c [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2020/11/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part5/">Unity + SteamVR SDKチュートリアル Part5</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>今回からテレポーテーションの作成に入っていきますが、まずは事前準備を進めます。<br>以下のチュートリアルの「Making A Laser Pointer」のパートになります<br><a rel="noreferrer noopener" href="https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity" target="_blank">https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity</a></p>



<h2 class="wp-block-heading">レーザーポインタの作成</h2>



<p>テレポート先を指し示すためのレーザーポインタを作成します。仕組み的には超細長いBOXオブジェクトを作成し、レーザーポインタとして利用します。設定内容は以下の通り。</p>



<p><strong>Position X:0 Y:5 Z:0<br>Scale X:0.005 Y:0.005 Z:1<br>Box Colliderコンポーネントを削除</strong></p>



<p>ここまでの操作で、以下のようになっているはずです</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-1.png"><img loading="lazy" decoding="async" width="1024" height="366" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-1-1024x366.png" alt="" class="wp-image-2370" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-1-1024x366.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-1-300x107.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-1-768x275.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-1-1536x549.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-1.png 1848w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>作成したLaserオブジェクトにマテリアルを割り当てます。マテリアルは以下の手順で作成します。</p>



<p><strong>RW &gt; Materialフォルダ配下に「<em>Laser</em>」の名称でマテリアルを新規作成<br>マテリアルのShaderを「Unit/Color」に変更<br>プロパティのMain Colorを赤(R:255, G:0, B:0)に変更<br>作成したマテリアルを、先ほど作成したLaserオブジェクトに適用</strong></p>



<p>ここまでの操作で、以下のような画面になります</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-2.png"><img loading="lazy" decoding="async" width="1024" height="653" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-2-1024x653.png" alt="" class="wp-image-2371" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-2-1024x653.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-2-300x191.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-2-768x490.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-2.png 1515w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>最後に作成したLaserオブジェクトを「RW &gt; Prefab」配下にプレハブ登録し、ヒエラルキービューからオブジェクトを削除しておきましょう。ここまでの操作で、以下のような画面になっているはずです</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-3.png"><img loading="lazy" decoding="async" width="1024" height="585" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-3-1024x585.png" alt="" class="wp-image-2372" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-3-1024x585.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-3-300x171.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-3-768x439.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-3-1536x878.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/Image-3.png 1682w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h2 class="wp-block-heading">レーザーポインタ表示用スクリプトの作成</h2>



<p>テレポートボタンが押されたときに、レーザーポイントが表示されるようにスクリプトを作成します。<br>スクリプト名は「LaserPointer」とし、「RW &gt; Scripts」配下に作成します。<br>今回も、作成したスクリプトの全体像を掲載します。</p>



<pre class="crayon-plain-tag">using UnityEngine;
using Valve.VR;

public class LaserPointer : MonoBehaviour
{
    public SteamVR_Input_Sources handType;
    public SteamVR_Behaviour_Pose controllerPose;
    public SteamVR_Action_Boolean teleportAction;

    public GameObject laserPrefab;      // レーザーオブジェクトのプレハブを保存

    private GameObject laser;           // 作成したレーザーインスタンスの保存
    private Transform laserTransform;   // 
    private Vector3 hitPoint;           // レーザーがヒットしたポジションを保存

    // Start is called before the first frame update
    void Start()
    {
        // プレハブからレーザーインスタンスを新規作成
        laser = Instantiate(laserPrefab);
        // トランスフォーム情報を保存
        laserTransform = laser.transform;
    }

    // Update is called once per frame
    void Update()
    {
        // テレポートアクションが行われた場合
        // (動き的にはテレポートボタンが押されている場合)
        if (teleportAction.GetState(handType))
        {
            RaycastHit hit;

            // コントローラから例を飛ばし、ヒットした場合はhitに内容を保存する
            if (Physics.Raycast(controllerPose.transform.position, transform.forward, out hit, 100))
            {
                hitPoint = hit.point;
                ShowLaser(hit);
            }
        }
        else // レイがヒットしていない場合、レーザーオブジェクトの表示を消す
        {
            laser.SetActive(false);
        }
    }

    private void ShowLaser(RaycastHit hit)
    {
        // レーザーを表示
        laser.SetActive(true);
        // コントローラとレイがヒットしたポイントの間にレーザーオブジェクトを配置
        // Leapを利用する理由は、0.5を指定することで、2点間の中間にオブジェクトを配置することができるから
        laserTransform.position = Vector3.Lerp(controllerPose.transform.position, hitPoint, 0.5f);
        // レイがヒットした方向にレーザーオブジェクトを向ける
        laserTransform.LookAt(hitPoint);
        // レイがヒットした位置に合わせて、レーザーオブジェクトの大きさを変える
        laserTransform.localScale = new Vector3(laserTransform.localScale.x,
                                                laserTransform.localScale.y,
                                                hit.distance);
    }
}</pre>



<p>作成したスクリプトをコントローラにアタッチし、各種項目を埋めていきます。<br>具体的な手順は以下の動画でご確認ください</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="624" height="649" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201115_001.gif" alt="" class="wp-image-2373"/></figure>



<h2 class="wp-block-heading">動作確認</h2>



<p>以上の設定でコントローラのテレポートボタンを押せば、レーザーが表示されるという動作が作成できているはずです。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1189" height="617" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201115_002.gif" alt="" class="wp-image-2374"/></figure>



<h2 class="wp-block-heading">以上</h2>



<p>今回はここまでとなります。テレポートを実現するうえで、もう少し下準備が必要なため、次回は準備の続きを行いたいと思います。</p>



<a href="https://www.amazon.co.jp/HTC-%E3%80%90%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E5%93%81%E3%80%91HTC-VIVE-Cosmos-Elite/dp/B08644DH8F/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-1&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=386f545e4bf5e66e3ff56ce1be2f5a68&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08644DH8F&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08644DH8F" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%80%90%E6%AD%A3%E8%A6%8F%E8%BC%B8%E5%85%A5%E5%93%81%E3%80%91Oculus-Rift-%E3%82%AA%E3%82%AD%E3%83%A5%E3%83%A9%E3%82%B9-%E3%83%AA%E3%83%95%E3%83%88-%E3%82%A8%E3%82%B9/dp/B07QLRRQB3/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-13&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=1e28ae6ce5eb94eb4c692adf4aa35e38&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B07QLRRQB3&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B07QLRRQB3" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%83%9F%E3%83%A9%E3%82%A4%E3%82%92%E3%81%A4%E3%81%8F%E3%82%8D%E3%81%86%EF%BC%81-VR%E3%81%A7%E7%B4%A1%E3%81%90%E3%83%90%E3%83%BC%E3%83%81%E3%83%A3%E3%83%AB%E5%89%B5%E4%B8%96%E8%A8%98-GOROman-ebook/dp/B088LV7TV6/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VR&amp;qid=1600004835&amp;s=books&amp;sr=1-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=d0849d42c58c76f109c4b3fc9222cb77&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B088LV7TV6&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B088LV7TV6" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0"><a href="https://www.amazon.co.jp/Oculus-Quest-2%E2%80%94%E5%AE%8C%E5%85%A8%E3%83%AF%E3%82%A4%E3%83%A4%E3%83%AC%E3%82%B9%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%AB%E3%82%A4%E3%83%B3%E3%83%AF%E3%83%B3VR%E3%83%98%E3%83%83%E3%83%89%E3%82%BB%E3%83%83%E3%83%88%E2%80%94256GB/dp/B08GCMGBCB/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;crid=2WUXNXTJ1M9G0&amp;dchild=1&amp;keywords=oculus+quest+2&amp;qid=1603031413&amp;sprefix=ocu,aps,269&amp;sr=8-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=c0e675f1d1bb6441941c883d69972dec&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08GCMGBCB&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08GCMGBCB" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<p>投稿 <a href="https://sheltie-garage.xyz/2020/11/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part5/">Unity + SteamVR SDKチュートリアル Part5</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unity + SteamVR SDKチュートリアル Part4</title>
		<link>https://sheltie-garage.xyz/2020/11/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part4/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Sun, 08 Nov 2020 14:23:12 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2362</guid>

					<description><![CDATA[<p>引き続きSteamVRのチュートリアルを進めていきます。今回は「Using The Controllers With Physics Objects」のパートから開始します。https://www.raywenderli [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2020/11/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part4/">Unity + SteamVR SDKチュートリアル Part4</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>引き続きSteamVRのチュートリアルを進めていきます。<br>今回は「Using The Controllers With Physics Objects」のパートから開始します。<br><a rel="noreferrer noopener" href="https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity" target="_blank">https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity</a></p>



<h2 class="wp-block-heading">コライダーの設定</h2>



<p>今回は物をつかんで投げるという動作を作成します。その準備として、まずはコントローラにコライダーを設定します。</p>



<p>まずは両方のコントローラを選択し、RigidBobyコンポーネントを追加します。<br>追加したRigidBodyコンポーネントはUse GravityをOFF、Is KinematicをONに設定します。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="508" height="479" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201108_Image-1.png" alt="" class="wp-image-2363" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201108_Image-1.png 508w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201108_Image-1-300x283.png 300w" sizes="auto, (max-width: 508px) 100vw, 508px" /></figure>



<p>次にBox Colliderコンポーネントを追加します。<br>Box Colliderの位置を以下のように修正します。<br>・Center X=0, Y=-0.04, Z=0.02<br>・Size X=0.14, Y=0.07, Z=0.05<br>・Is Triggerにチェックを入れる</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="600" height="468" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201108_Image-2-1.png" alt="" class="wp-image-2365" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201108_Image-2-1.png 600w, https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201108_Image-2-1-300x234.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></figure>



<h2 class="wp-block-heading">スクリプトの記述</h2>



<p>下準備が終わったので、実際にモノを掴むというスクリプトを作成します。</p>



<p>RW &gt; Scripts フォルダ配下に「ControllerGrabObject」という名前でスクリプトを作成します<br>スクリプト全体像は以下の通りになりますので、参考にしてみてください</p>



<pre class="crayon-plain-tag">using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR; // SteamVRの機能を利用するので、using文を追加

public class ControllerGrabObject : MonoBehaviour
{
    public SteamVR_Input_Sources handType;          // コントローラ入力元
    public SteamVR_Behaviour_Pose controllerPose;   // コントローラの位置情報
    public SteamVR_Action_Boolean grabAction;       // コントローラの「つかむ」アクション

    private GameObject collidingObject;             // コライダーが接触しているオブジェクトを保存(接触しているコライダーが存在するか)
    private GameObject objectInHand;                // 現在オブジェクトを掴んでいるか

    // Update is called once per frame
    void Update()
    {
        if (grabAction.GetLastStateDown(handType))
        {
            if (collidingObject)
            {
                GrabObject();
            }
        }

        if (grabAction.GetLastStateUp(handType))
        {
            if (objectInHand)
            {
                ReleaseObject();
            }
        }        
    }

    // コライダーが接触したとき
    public void OnTriggerEnter(Collider other)
    {
        SetCollideingObject(other);
    }
    // コライダーが触れているとき
    public void OnTriggerStay(Collider other)
    {
        SetCollideingObject(other);
    }
    // コライダーがはずれたとき
    public void OnTriggerExit(Collider other)
    {
        if (!collidingObject)
        {
            return;
        }

        collidingObject = null;
    }

    private void SetCollideingObject(Collider col)
    {
        // すでに何かをつかんでいる場合、もしくは対象にRigidBodyコンポーネントが存在しない場合
        // 処理しない
        if (collidingObject || !col.GetComponent&amp;lt;Rigidbody&amp;gt;())
        {
            return;
        }

        // コライダーが接触したオブジェクトを保存
        collidingObject = col.gameObject;
    }

    // オブジェクトを掴む
    // FixedJointコンポーネントをコントローラオブジェクトに追加し、
    // つかんでいるオブジェクトのRigidBodyを接続することで
    // つかむという動作を実現している
    private void GrabObject()
    {
        objectInHand = collidingObject;
        collidingObject = null;

        var joint = AddFixedJoint();
        joint.connectedBody = objectInHand.GetComponent&amp;lt;Rigidbody&amp;gt;();
    }

    // FixedJointコンポーネントを動的に追加する
    // 勝手に外れないように、breakForceとbreakTorqueに大きな値を入れている
    private FixedJoint AddFixedJoint()
    {
        FixedJoint fx = gameObject.AddComponent&amp;lt;FixedJoint&amp;gt;();
        fx.breakForce = 20000;
        fx.breakTorque = 20000;

        return fx;
    }

    // オブジェクトを放す
    // 追加したFixedjointを破棄し、
    // 放したときのコントローラのVelocityをオブジェクトにコピーすることで
    // 「投げる」という挙動を再現している
    private void ReleaseObject()
    {
        if (GetComponent&amp;lt;FixedJoint&amp;gt;())
        {
            GetComponent&amp;lt;FixedJoint&amp;gt;().connectedBody = null;
            Destroy(GetComponent&amp;lt;FixedJoint&amp;gt;());

            objectInHand.GetComponent&amp;lt;Rigidbody&amp;gt;().velocity = controllerPose.GetVelocity();
            objectInHand.GetComponent&amp;lt;Rigidbody&amp;gt;().angularVelocity = controllerPose.GetAngularVelocity();
        }

        objectInHand = null;
    }
}</pre>



<p>作成したスクリプトをコントローラに適用していきます。スクリプトを適用した後は「HandType」「Controller Pose」「Grab Action」の3つを設定します</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="601" height="754" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201108_VR_grab1.gif" alt="" class="wp-image-2366"/></figure>



<h2 class="wp-block-heading">動作確認</h2>



<p>以上の設定でボールや箱がつかめるようになっているはずです。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1222" height="600" src="https://sheltie-garage.xyz/wp-content/uploads/2020/11/20201108_VR_grab2.gif" alt="" class="wp-image-2367"/></figure>



<p>ものがつかめるようになったことで、VRで表現できる幅が一気に広がりますね</p>



<h2 class="wp-block-heading">今回は以上です</h2>



<p>次回からはテレポーテーションの作成準備に入っていきます</p>



<a href="https://www.amazon.co.jp/HTC-%E3%80%90%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E5%93%81%E3%80%91HTC-VIVE-Cosmos-Elite/dp/B08644DH8F/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-1&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=386f545e4bf5e66e3ff56ce1be2f5a68&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08644DH8F&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08644DH8F" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%80%90%E6%AD%A3%E8%A6%8F%E8%BC%B8%E5%85%A5%E5%93%81%E3%80%91Oculus-Rift-%E3%82%AA%E3%82%AD%E3%83%A5%E3%83%A9%E3%82%B9-%E3%83%AA%E3%83%95%E3%83%88-%E3%82%A8%E3%82%B9/dp/B07QLRRQB3/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-13&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=1e28ae6ce5eb94eb4c692adf4aa35e38&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B07QLRRQB3&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B07QLRRQB3" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%83%9F%E3%83%A9%E3%82%A4%E3%82%92%E3%81%A4%E3%81%8F%E3%82%8D%E3%81%86%EF%BC%81-VR%E3%81%A7%E7%B4%A1%E3%81%90%E3%83%90%E3%83%BC%E3%83%81%E3%83%A3%E3%83%AB%E5%89%B5%E4%B8%96%E8%A8%98-GOROman-ebook/dp/B088LV7TV6/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VR&amp;qid=1600004835&amp;s=books&amp;sr=1-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=d0849d42c58c76f109c4b3fc9222cb77&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B088LV7TV6&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B088LV7TV6" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0"><a href="https://www.amazon.co.jp/Oculus-Quest-2%E2%80%94%E5%AE%8C%E5%85%A8%E3%83%AF%E3%82%A4%E3%83%A4%E3%83%AC%E3%82%B9%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%AB%E3%82%A4%E3%83%B3%E3%83%AF%E3%83%B3VR%E3%83%98%E3%83%83%E3%83%89%E3%82%BB%E3%83%83%E3%83%88%E2%80%94256GB/dp/B08GCMGBCB/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;crid=2WUXNXTJ1M9G0&amp;dchild=1&amp;keywords=oculus+quest+2&amp;qid=1603031413&amp;sprefix=ocu,aps,269&amp;sr=8-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=c0e675f1d1bb6441941c883d69972dec&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08GCMGBCB&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08GCMGBCB" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<p>投稿 <a href="https://sheltie-garage.xyz/2020/11/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part4/">Unity + SteamVR SDKチュートリアル Part4</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unity + SteamVR SDKチュートリアル Part3</title>
		<link>https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part3/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Sun, 25 Oct 2020 14:09:37 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2340</guid>

					<description><![CDATA[<p>前回に続き、SteamVRのチュートリアルを進めていきます。使用するチュートリアルは以下の「Using Actions」のセクションからになりますhttps://www.raywenderlich.com/9189-ht [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part3/">Unity + SteamVR SDKチュートリアル Part3</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>前回に続き、SteamVRのチュートリアルを進めていきます。<br>使用するチュートリアルは以下の「Using Actions」のセクションからになります<br><a rel="noreferrer noopener" href="https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity" target="_blank">https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity</a></p>



<h1 class="wp-block-heading">Pose Action設定</h1>



<p>チュートリアル通りに進めてると、右コントローラ、左コントローラのPose Actionを「SkeltonLeftHand(SkeltonRighthand)」に変更してください。と記述されています。<br>が、実際に操作してみると、ドロップダウンにSkelton～の選択肢が表示されず、選べるアクションはPoseのみとなっています。<br>今回のチュートリアルではコントローラの位置が取得できれば良いので、Poseアクションが設定されていることを確認するだけにとどめます。</p>



<p>下図のように、コントローラのPose Actionに「\action\input\default\in\Pose」が設定されていればOKです。</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-1.png"><img loading="lazy" decoding="async" width="936" height="653" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-1.png" alt="" class="wp-image-2341" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-1.png 936w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-1-300x209.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-1-768x536.png 768w" sizes="auto, (max-width: 936px) 100vw, 936px" /></a></figure>



<h1 class="wp-block-heading">スクリプトの作成</h1>



<p>定義したアクションを利用するためにスクリプトを記述します<br>「Asset &gt; RW &gt; Scripts」配下に「ActionTest」という名前でC#スクリプトを作成します。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="797" height="296" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9-1.png" alt="" class="wp-image-2342" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9-1.png 797w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9-1-300x111.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9-1-768x285.png 768w" sizes="auto, (max-width: 797px) 100vw, 797px" /></figure>



<p>作成した「ActionTest」スクリプトを開き、以下の修正を行っていきます</p>



<p>Start()メソッドは不要なので削除します。</p>



<p>ファイルの先頭にUsingを追加します</p>



<pre class="crayon-plain-tag">using Valve.VR;</pre>



<p><br>以下の3つの変数を定義します。</p>



<pre class="crayon-plain-tag">public SteamVR_Input_Sources handType; // インプット状態を取得するコントローラ
public SteamVR_Action_Boolean teleportAction; // テレポートアクションへのリファレンス
public SteamVR_Action_Boolean grabAction; //  グラッブアクションへのリファレンス</pre>



<p>Updateメソッドの下に、以下のコードを追加します</p>



<pre class="crayon-plain-tag">public bool GetTeleportDown() // テレポートアクションが押された時の動き
{
    return teleportAction.GetStateDown(handType);
}

public bool GetGrab() // グラッブアクションが押された時の動き
{
    return grabAction.GetState(handType);
}</pre>



<p>最後に、Updateメソッドの中に以下のコードを追加します</p>



<pre class="crayon-plain-tag">if (GetTeleportDown())
{
    print(&quot;Teleport &quot; + handType);
}

if (GetGrab())
{
    print(&quot;Grab &quot; + handType);
}</pre>



<p>ここまでで、ActionTestの全体像は以下の通りになります</p>



<pre class="crayon-plain-tag">using UnityEngine;
using Valve.VR;

public class ActionTest : MonoBehaviour
{
    public SteamVR_Input_Sources handType; 
    public SteamVR_Action_Boolean teleportAction;
    public SteamVR_Action_Boolean grabAction; 

    // Update is called once per frame
    void Update()
    {
        if (GetTeleportDown())
        {
            print(&quot;Teleport &quot; + handType);
        }

        if (GetGrab())
        {
            print(&quot;Grab &quot; + handType);
        }
    }

    public bool GetTeleportDown()
    {
        return teleportAction.GetStateDown(handType);
    }

    public bool GetGrab() 
    {
        return grabAction.GetState(handType);
    }
}</pre>



<h2 class="wp-block-heading">コントローラへのスクリプト割り当て</h2>



<p>作成したActionTestスクリプトをコントローラに割り当て、各種設定を行います。<br>・Controller (left)、Controller (Right)にActionTestスクリプトをアタッチ<br>・HandTypeに「Left Hand(またはRight Hand)を設定」<br>・Teleport Actionに「\action\input\default\in\Teleport」を設定<br>・Grab Actionに「\action\input\default\in\Grab」を設定<br>詳しくは以下の動画をご覧ください。</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2020/10/20201025_VR_actiontest.gif"><img loading="lazy" decoding="async" width="939" height="948" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/20201025_VR_actiontest.gif" alt="" class="wp-image-2343"/></a></figure>



<h2 class="wp-block-heading">動作確認</h2>



<p>以上の設定で、コントローラのボタン操作に応じて、コンソールにメッセージが表示されるようになります。<br>前回のコントローラバインドで、<br>・テレポートはタッチパッド上<br>・グラッブはトリガー<br>にボタンを設定していますので、上記のボタンを押せば、メッセージが表示されます。</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2020/10/20201025_VR_actiontest2.gif"><img loading="lazy" decoding="async" width="1024" height="735" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/20201025_VR_actiontest2-1024x735.gif" alt="" class="wp-image-2344" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/20201025_VR_actiontest2-1024x735.gif 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/20201025_VR_actiontest2-300x215.gif 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/20201025_VR_actiontest2-768x551.gif 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>コントローラの対応したボタンを押すと、メッセージが表示されるはずです。</p>



<h1 class="wp-block-heading">今回は以上</h1>



<p>今回はインプットの基礎部分を作成しました。<br>次回は、実際にVR空間のオブジェクトを掴む動作を作成したいと思います</p>



<a href="https://www.amazon.co.jp/HTC-%E3%80%90%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E5%93%81%E3%80%91HTC-VIVE-Cosmos-Elite/dp/B08644DH8F/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-1&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=386f545e4bf5e66e3ff56ce1be2f5a68&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08644DH8F&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08644DH8F" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%80%90%E6%AD%A3%E8%A6%8F%E8%BC%B8%E5%85%A5%E5%93%81%E3%80%91Oculus-Rift-%E3%82%AA%E3%82%AD%E3%83%A5%E3%83%A9%E3%82%B9-%E3%83%AA%E3%83%95%E3%83%88-%E3%82%A8%E3%82%B9/dp/B07QLRRQB3/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-13&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=1e28ae6ce5eb94eb4c692adf4aa35e38&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B07QLRRQB3&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B07QLRRQB3" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%83%9F%E3%83%A9%E3%82%A4%E3%82%92%E3%81%A4%E3%81%8F%E3%82%8D%E3%81%86%EF%BC%81-VR%E3%81%A7%E7%B4%A1%E3%81%90%E3%83%90%E3%83%BC%E3%83%81%E3%83%A3%E3%83%AB%E5%89%B5%E4%B8%96%E8%A8%98-GOROman-ebook/dp/B088LV7TV6/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VR&amp;qid=1600004835&amp;s=books&amp;sr=1-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=d0849d42c58c76f109c4b3fc9222cb77&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B088LV7TV6&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B088LV7TV6" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0"><a href="https://www.amazon.co.jp/Oculus-Quest-2%E2%80%94%E5%AE%8C%E5%85%A8%E3%83%AF%E3%82%A4%E3%83%A4%E3%83%AC%E3%82%B9%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%AB%E3%82%A4%E3%83%B3%E3%83%AF%E3%83%B3VR%E3%83%98%E3%83%83%E3%83%89%E3%82%BB%E3%83%83%E3%83%88%E2%80%94256GB/dp/B08GCMGBCB/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;crid=2WUXNXTJ1M9G0&amp;dchild=1&amp;keywords=oculus+quest+2&amp;qid=1603031413&amp;sprefix=ocu,aps,269&amp;sr=8-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=c0e675f1d1bb6441941c883d69972dec&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08GCMGBCB&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08GCMGBCB" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">



<p></p>
<p>投稿 <a href="https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part3/">Unity + SteamVR SDKチュートリアル Part3</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unity + SteamVR SDKチュートリアル Part2</title>
		<link>https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part2/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Sun, 18 Oct 2020 14:32:27 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2321</guid>

					<description><![CDATA[<p>全開に続き、SteamVRのチュートリアルを進めていきます。使用するチュートリアルは以下の「Handling Input」のセクションからになりますhttps://www.raywenderlich.com/9189-h [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part2/">Unity + SteamVR SDKチュートリアル Part2</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>全開に続き、SteamVRのチュートリアルを進めていきます。<br>使用するチュートリアルは以下の「Handling Input」のセクションからになります<br><a href="https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity" target="_blank" rel="noreferrer noopener">https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity</a></p>



<h1 class="wp-block-heading">Steam Inputについて</h1>



<p>SteamVR Ver1からVer2になったことで大きく変わったのがインプット関連でしょう。<br>Ver2のインプットシステムについては、「<a rel="noreferrer noopener" href="https://framesynthesis.jp/tech/unity/htcvive/" target="_blank">frames ynthesis</a>」様のサイトで分かりやすく書かれています</p>



<p>SteamVR Ver2ではボタン入力を「アクション」として定義し、利用します。<br>アクションとは「物をつかむ」「テレポートする」といった具体的に行いたい行動を定義しておき、そのアクションに対応するボタンは、別途用意された専用のバインド画面を利用して、ボタンとアクションを紐づけて利用します。</p>



<p>言葉にすると少しわかりにくいですが、今回のチュートリアルの内容でおおよその利用方法を掴めると思います。</p>



<h1 class="wp-block-heading">アクションを定義する</h1>



<p>メニューの Window &gt; SteamVR Input を選択します</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="634" height="382" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-1-1.png" alt="" class="wp-image-2322" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-1-1.png 634w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-1-1-300x181.png 300w" sizes="auto, (max-width: 634px) 100vw, 634px" /></figure>



<p>初回実行時は設定ファイルが見つからないため、「サンプルファイルを作成するか」のダイアログが表示されます。<br>Yesを選択して進めます</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="389" height="156" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2-1.png" alt="" class="wp-image-2323" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2-1.png 389w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2-1-300x120.png 300w" sizes="auto, (max-width: 389px) 100vw, 389px" /></figure>



<p>デフォルトでは、以下の4種類のサンプルが設定されています。<br>・default<br>・platfomer &#8211; マリオのような横スクロールアクションをPlatfomerと呼ぶそうです<br>・buggy &#8211; 車の運転のサンプル<br>・mixedreality &#8211; MRのサンプル設定のようです</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="552" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-1-1024x552.png" alt="" class="wp-image-2324" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-1-1024x552.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-1-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-1-768x414.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-1.png 1244w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>今回はdefault以外は不要なので、以下の方法で不要な設定を削除します。<br>platformerを選択し、表示される「-」ボタンを押します。これで設定が削除できます。<br>buggy、mixedrealityも同じ手順で削除します。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="552" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-1-1024x552.png" alt="" class="wp-image-2325" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-1-1024x552.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-1-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-1-768x414.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-1.png 1244w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>次にdefaultで設定されているアクションで不要なものを削除します。削除するのは以下の通りです<br>・InteractUI<br>・GrabPinch<br>・Squeeze<br>の3つになります</p>



<p><strong><span class="has-inline-color has-vivid-red-color">※チュートリアルではPoseも削除するとありますが、これを削除するとコントローラの位置を取得できなくなりますので、消してはいけません!</span></strong></p>



<p>不要なアクションを選択し、「-」ボタンでアクションを削除することができます。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="552" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-5-1-1024x552.png" alt="" class="wp-image-2326" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-5-1-1024x552.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-5-1-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-5-1-768x414.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-5-1.png 1244w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>チュートリアルに合わせて、「GrabGrip」のアクション名を「Grab」に変更しておきます</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="552" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-6-1-1024x552.png" alt="" class="wp-image-2327" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-6-1-1024x552.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-6-1-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-6-1-768x414.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-6-1.png 1244w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>以上の設定を行ったら、「Save and Generate」ボタンを押します。<br>ソースコードの生成とコンパイルが動くので、終わるまで待ちましょう</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="552" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-1024x552.png" alt="" class="wp-image-2328" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-1024x552.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7-768x414.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-7.png 1244w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h1 class="wp-block-heading">アクションのバインド</h1>



<p>先ほど作成したアクション(Grabなど)を実際のコントローラのボタンに割り当てます。<br>今回は「HTC Vive」向けの設定方法になります。<br>SteamVR Inputのダイアログ右下に「Open binding UI」というボタンがあるのでクリックします</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="552" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-8-1024x552.png" alt="" class="wp-image-2329" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-8-1024x552.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-8-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-8-768x414.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-8.png 1244w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>以下のような画面が表示されるので、GamePadをクリックし、Vive Controllerに設定を変更します</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="574" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9-1024x574.png" alt="" class="wp-image-2330" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9-1024x574.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9-300x168.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9-768x431.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-9.png 1491w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>現在のバインドの項目内の「編集」をクリックします</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="553" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-10-1024x553.png" alt="" class="wp-image-2331" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-10-1024x553.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-10-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-10-768x415.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-10.png 1489w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>以下のような画面が表示されます</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="574" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-11-1024x574.png" alt="" class="wp-image-2332" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-11-1024x574.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-11-300x168.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-11-768x431.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-11.png 1491w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>この画面を使用して、アクションとボタンを関連付けていきます。<br>まずはデフォルトで設定されているアクションを削除します。<br>各項目にカーソルを合わせると、ゴミ箱アイコンが表示されるため、クリックして削除していきます<br>(アクションポーズの編集にもアクションが割り当てられていますが、こちらは削除する必要はありません)</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="553" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-12-1024x553.png" alt="" class="wp-image-2333" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-12-1024x553.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-12-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-12-768x415.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-12.png 1489w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>すべて取り除いた状態。バインドされていないアクションがあるという警告が表示されます</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="597" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-13-1024x597.png" alt="" class="wp-image-2334" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-13-1024x597.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-13-300x175.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-13-768x448.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-13.png 1489w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>改めて、アクションをボタンに割り当てていきます。割り当て方は以下の通り<br>トリガーの+ボタンをクリック &gt; BUTTONをクリック &gt; クリックと書かれた右側にある「なし」をクリック &gt; 表示される候補から「grab」を選択</p>



<p>以上の操作を行うと、下のような画面になっているはずです</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="597" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-14-1024x597.png" alt="" class="wp-image-2335" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-14-1024x597.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-14-300x175.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-14-768x448.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-14.png 1489w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>同じ手順で以下の設定を行います。</p>



<p>トラックパッドの+ボタンをクリック &gt; BUTTONをクリック &gt; クリックと書かれた右側にある「なし」をクリック &gt; 表示される候補から「teleport」を選択</p>



<p>設定が終わると、以下の画面になっていると思います。<br>警告が2つ表示されますが、今回のチュートリアルでは未使用なので無視します</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="618" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-15-1024x618.png" alt="" class="wp-image-2336" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-15-1024x618.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-15-300x181.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-15-768x464.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-15.png 1491w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>本家チュートリアルでは最後に「Replace Default Binding(デフォルトバインドの置換)」をクリックしてくださいとありますが、今回はクリックしません！<br>これは標準のバインドを今回設定したバインドに置き換えてしまうためです。<br>今回はあくまでチュートリアル用のバインドなので、標準バインドと置き換える必要はありません。<br><br>今回は個人用バインドを保存　をクリックして設定を保存しておきましょう</p>



<h1 class="wp-block-heading">今回はここまで</h1>



<p>今回はSteamVRのアクション定義方法と、コントローラボタンへのバインド方法を紹介しました。<br>次回は実際にプログラムを記述して、今回設定した内容がどのように利用されるのか確認していきます。</p>



<a href="https://www.amazon.co.jp/HTC-%E3%80%90%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E5%93%81%E3%80%91HTC-VIVE-Cosmos-Elite/dp/B08644DH8F/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-1&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=386f545e4bf5e66e3ff56ce1be2f5a68&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08644DH8F&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08644DH8F" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%80%90%E6%AD%A3%E8%A6%8F%E8%BC%B8%E5%85%A5%E5%93%81%E3%80%91Oculus-Rift-%E3%82%AA%E3%82%AD%E3%83%A5%E3%83%A9%E3%82%B9-%E3%83%AA%E3%83%95%E3%83%88-%E3%82%A8%E3%82%B9/dp/B07QLRRQB3/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-13&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=1e28ae6ce5eb94eb4c692adf4aa35e38&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B07QLRRQB3&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B07QLRRQB3" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%83%9F%E3%83%A9%E3%82%A4%E3%82%92%E3%81%A4%E3%81%8F%E3%82%8D%E3%81%86%EF%BC%81-VR%E3%81%A7%E7%B4%A1%E3%81%90%E3%83%90%E3%83%BC%E3%83%81%E3%83%A3%E3%83%AB%E5%89%B5%E4%B8%96%E8%A8%98-GOROman-ebook/dp/B088LV7TV6/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VR&amp;qid=1600004835&amp;s=books&amp;sr=1-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=d0849d42c58c76f109c4b3fc9222cb77&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B088LV7TV6&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B088LV7TV6" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0"><a href="https://www.amazon.co.jp/Oculus-Quest-2%E2%80%94%E5%AE%8C%E5%85%A8%E3%83%AF%E3%82%A4%E3%83%A4%E3%83%AC%E3%82%B9%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%AB%E3%82%A4%E3%83%B3%E3%83%AF%E3%83%B3VR%E3%83%98%E3%83%83%E3%83%89%E3%82%BB%E3%83%83%E3%83%88%E2%80%94256GB/dp/B08GCMGBCB/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;crid=2WUXNXTJ1M9G0&amp;dchild=1&amp;keywords=oculus+quest+2&amp;qid=1603031413&amp;sprefix=ocu,aps,269&amp;sr=8-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=c0e675f1d1bb6441941c883d69972dec&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08GCMGBCB&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08GCMGBCB" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<p>投稿 <a href="https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part2/">Unity + SteamVR SDKチュートリアル Part2</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unity + SteamVR SDKチュートリアル Part1</title>
		<link>https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part1/</link>
		
		<dc:creator><![CDATA[sheltie]]></dc:creator>
		<pubDate>Sun, 11 Oct 2020 14:03:14 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[VR]]></category>
		<category><![CDATA[技術系]]></category>
		<guid isPermaLink="false">https://sheltie-garage.xyz/?p=2312</guid>

					<description><![CDATA[<p>SteamVRの良さげなチュートリアルがあったので紹介します。チュートリアルサイトは英語で、実際にやってみるとはまってしまうところもあったため、その点を含めて紹介していければと思います。 このチュートリアルを行うことで、 [&#8230;]</p>
<p>投稿 <a href="https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part1/">Unity + SteamVR SDKチュートリアル Part1</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></description>
										<content:encoded><![CDATA[
<p>SteamVRの良さげなチュートリアルがあったので紹介します。<br>チュートリアルサイトは英語で、実際にやってみるとはまってしまうところもあったため、その点を含めて紹介していければと思います。</p>



<p>このチュートリアルを行うことで、SteamVRインプットの設定方法や使い方、VR空間上でのものを掴む、投げる動作、テレポートの作り方を学ぶことができます。</p>



<h2 class="wp-block-heading">紹介するチュートリアル</h2>



<p><a rel="noreferrer noopener" href="https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity" target="_blank">https://www.raywenderlich.com/9189-htc-vive-tutorial-for-unity</a></p>



<p>このページのDownload Material のリンクから、チュートリアルで使用するアセット一式をダウンロードできます。</p>



<p>Unity 2018向けの無いようになっていますが、Unity2020系でも大丈夫です。<br>では、チュートリアルを進めていきましょう。<br>本家チュートリアルと比較して、一部順番が入れ替わっている部分がありますので注意して読み進めてください。</p>



<h2 class="wp-block-heading">プロジェクト作成とSteamVR読み込み</h2>



<p>本家チュートリアルでは「Setting Up SteamVR」の部分に相当します。<br>まずはUnityプロジェクトを新規で作成し、SteamVRのパッケージを取り込むところまで行います。<br>SteamVRを取り込んだ後に表示される、以下の画面まで行ったら「Accept All」を押してひとまず完了です。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="696" height="581" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-1.png" alt="" class="wp-image-2313" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-1.png 696w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-1-300x250.png 300w" sizes="auto, (max-width: 696px) 100vw, 696px" /></figure>



<h2 class="wp-block-heading">チュートリアル用アセットの読み込み</h2>



<p>本家チュートリアルサイトよりダインロードした教材をUnityに取り込みます</p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2.png"><img loading="lazy" decoding="async" width="1024" height="554" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2-1024x554.png" alt="" class="wp-image-2314" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2-1024x554.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2-300x162.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2-768x415.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2-1536x830.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-2.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>教材を取り込んだら、以下のシーンをオープンします<br><em>RW > Scene > Game</em></p>



<p>シーンを開くと部屋のようなシーンが開くはずです</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="555" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-1024x555.png" alt="" class="wp-image-2316" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-1024x555.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3-1536x832.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-3.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>このシーンに対して、VRの対応を行います。といっても、いくつかゲームオブジェクトを置き換えるだけで済みます</p>



<h2 class="wp-block-heading">SteamVRに対応させる</h2>



<p>読み込んだSteamVRのPrefabから、必要なアイテムをヒエラルキーに追加します。<br>SteamVR > Prefabs 配下にある以下2つのファイルをヒエラルキービューに追加します<br><em>[CameraRig]<br>[SteamVR]</em></p>



<figure class="wp-block-image size-large"><a href="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4.png"><img loading="lazy" decoding="async" width="1024" height="555" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-1024x555.png" alt="" class="wp-image-2317" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-1024x555.png 1024w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-300x163.png 300w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-768x416.png 768w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4-1536x832.png 1536w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-4.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>追加した[CameraRig]のポジションをX:0 Y:0 Z:-1.1 に設定します</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="370" height="101" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-5.png" alt="" class="wp-image-2318" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-5.png 370w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-5-300x82.png 300w" sizes="auto, (max-width: 370px) 100vw, 370px" /></figure>



<p>ヒエラルキービューからMain Camera を削除します。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="308" height="200" src="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-6.png" alt="" class="wp-image-2319" srcset="https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-6.png 308w, https://sheltie-garage.xyz/wp-content/uploads/2020/10/Image-6-300x195.png 300w" sizes="auto, (max-width: 308px) 100vw, 308px" /></figure>



<h2 class="wp-block-heading">動かしてみよう</h2>



<p>この状態で、Unityの再生ボタンを押してゲームを実行します。<br>VR対応が行われていることへの確認と、コントローラを動かせばトラッキングも行われていることが確認できると思います。</p>



<h2 class="wp-block-heading">以上</h2>



<p>次回はインプットシステムの紹介を行いたいと思います</p>



<a href="https://www.amazon.co.jp/HTC-%E3%80%90%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E5%93%81%E3%80%91HTC-VIVE-Cosmos-Elite/dp/B08644DH8F/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-1&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=386f545e4bf5e66e3ff56ce1be2f5a68&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B08644DH8F&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B08644DH8F" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%80%90%E6%AD%A3%E8%A6%8F%E8%BC%B8%E5%85%A5%E5%93%81%E3%80%91Oculus-Rift-%E3%82%AA%E3%82%AD%E3%83%A5%E3%83%A9%E3%82%B9-%E3%83%AA%E3%83%95%E3%83%88-%E3%82%A8%E3%82%B9/dp/B07QLRRQB3/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=HTC+Vive&amp;qid=1600004657&amp;sr=8-13&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=1e28ae6ce5eb94eb4c692adf4aa35e38&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B07QLRRQB3&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B07QLRRQB3" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<a href="https://www.amazon.co.jp/%E3%83%9F%E3%83%A9%E3%82%A4%E3%82%92%E3%81%A4%E3%81%8F%E3%82%8D%E3%81%86%EF%BC%81-VR%E3%81%A7%E7%B4%A1%E3%81%90%E3%83%90%E3%83%BC%E3%83%81%E3%83%A3%E3%83%AB%E5%89%B5%E4%B8%96%E8%A8%98-GOROman-ebook/dp/B088LV7TV6/ref=as_li_ss_il?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;dchild=1&amp;keywords=VR&amp;qid=1600004835&amp;s=books&amp;sr=1-6&amp;linkCode=li2&amp;tag=monodon-22&amp;linkId=d0849d42c58c76f109c4b3fc9222cb77&amp;language=ja_JP" target="_blank" rel="noopener noreferrer"><img decoding="async" src="//ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B088LV7TV6&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=monodon-22&amp;language=ja_JP" border="0"></a><img loading="lazy" decoding="async" src="https://ir-jp.amazon-adsystem.com/e/ir?t=monodon-22&amp;language=ja_JP&amp;l=li2&amp;o=9&amp;a=B088LV7TV6" alt="" style="border:none !important; margin:0px !important;" width="1" height="1" border="0">
<p>投稿 <a href="https://sheltie-garage.xyz/2020/10/unity-steamvr-sdk%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab-part1/">Unity + SteamVR SDKチュートリアル Part1</a> は <a href="https://sheltie-garage.xyz">Sheltie&#039;s Garage</a> に最初に表示されました。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
