投稿日:2017年10月23日  カテゴリー:VR  投稿者:SingularityMaster

■はじめに

前回までの記事で、『Avatar Grab Sample』が実行できるようになりました。今度はこの『Avatar Grab Sample』を参考に、OculusTouchでオブジェクトを掴む方法を学んでいきます。

 

■オブジェクトを掴むプロジェクトの作成

前回の記事で作成した『Avatar Grab Sample』と見比べながら、新しいプロジェクトを作成していきます。

 

 

前回作成した『Avatar Grab Sample』のプロジェクトをフォルダごとコピーして、オリジナルの『Avatar Grab Sample』プロジェクトとコピーしたプロジェクトを同時に開いてください。

 

 

コピーした方のプロジェクトで新しいシーンを作成して、適当な名前でシーンを保存してください。以降、この新しいシーンで、オブジェクトを掴むプロジェクトを新規に作成していきます。

 

 

まず、シーンに1人称視点のアバターを設置します。ProjectビューのAssets->OVRAvatar->Content->Prefabsの中に、「LocalAvatar.prefab」というファイルがあるので、これをHierarchyビューにドラッグします。これが自分の手を表示するオブジェクトとなります。

 

 

次に、この「LocalAvatar.prefab」の子オブジェクトとして、VR用の1人称カメラを設置します。ProjectビューのAssets->OVR->Prefabsの中に、「OVRCameraRig.prefab」というファイルがあるので、これをHierarchyビューの「LocalAvatar」直下にドラッグします。

 

 

これで1人称用のアバターと1人称用のVRカメラがリンクされました。ここでいったんシーンを実行してみてください。OculusTouchを持った自分の手の位置に、アバターの手が表示されているはずです。

 

 

次に掴むオブジェクトと地面を用意します。HierarchyビューのCreate->3D Object->CubeおよびPlaneを設置してください。

 

 

Cubeがやや大きすぎるので、CubeのInspector画面からScaleをX:0.2, Y:0.2, Z:0.2にしてください。さらに地面にめり込んでいるのでPositionをY:1にしてください。

 

 

次にCubeに物理演算を適用させます。CubeのHierarchyビューからAddComponent->Physics->Rigidbodyを選択してください。これでCubeに物理演算が適用されました。いったんシーンを実行してみてください。Cubeが重力に従って落下し、地面に着地するはずです。

 

これでプロジェクトの下準備は完了です。次の記事で、オブジェクトを掴むための設定をしていきます。

 

前の記事 次の記事

2Wbyyv <a href="http://fufipbarjard.com/">fufipbarjard</a>, [url=http://plhwsmkbnqhs.com/]plhwsmkbnqhs[/url], [link=http://culoxfnejbyf.com/]culoxfnejbyf[/link], http://ocnimsvyprda.com/

 2Wbyyv <a href="http://fufipbarjard.com/">fufipbarjard</a>, [url=http://plhwsmkbnqhs.com/]plhwsmkbnqhs[/url], [link=http://culoxfnejbyf.com/]culoxfnejbyf[/link], http://ocnimsvyprda.com/

rjrlhV <a href="http://gnlghgjabqfy.com/">gnlghgjabqfy</a>, [url=http://lstgflqxowvs.com/]lstgflqxowvs[/url], [link=http://nmmuukjmcdhg.com/]nmmuukjmcdhg[/link], http://nxksbeilclyb.com/

 rjrlhV <a href="http://gnlghgjabqfy.com/">gnlghgjabqfy</a>, [url=http://lstgflqxowvs.com/]lstgflqxowvs[/url], [link=http://nmmuukjmcdhg.com/]nmmuukjmcdhg[/link], http://nxksbeilclyb.com/

?????

 liquid tadalafil side effects https://tadalisxs.com/ tadalafil 5 mg tablet

?????

 erectile restoration https://plaquenilx.com/ erectile injections pics

?????

 chloraquine https://chloroquineorigin.com/ chloroquine phosphate vs chloroquine sulphate

?????

 hydroxychloroquine sulfate tabs 200mg https://hydroxychloroquinex.com/ hydroxychloroquine eye

?????

 cbd effects https://cbdcreamshs.com/ - hemp oil cbd pure <a href="https://cbdcreamshs.com/ ">cannabinoids </a> charlottes web cbd

?????

 can i get zithromax over the counter https://zithromaxes.com/ zpack uti

?????

 chloroquine moa <a href=https://chloroquineorigin.com/#>aralen uk</a> erectile solution ratings <a href=https://besterectiledysfunctionpills.com/#>erectile injection therapy</a> hcq 200 <a href=https://hydroxychloroquinex.com/#>cure for covid 19</a> buy erectile dysfunction meds online <a href=https://plaquenilx.com/#>plaquenil hydroxychloroquine</a> dragon erection <a href=https://tadalisxs.com/#>tadalafil online</a> does zithromax treat uti <a href=https://zithromaxes.com/#>where can you buy zithromax</a>

?????

 priligy pills <a href="https://priligydapoxetinex.com/buy">buy avanafil usa</a>

Powered By

Copyright (C) 2017 テクノロジーカフェシンギュラリティ. All Rights Reserved.