前回までの記事で、『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が重力に従って落下し、地面に着地するはずです。
これでプロジェクトの下準備は完了です。次の記事で、オブジェクトを掴むための設定をしていきます。
前の記事 次の記事
Some First Class stamps <a href="http://www.custom-creations.org/i-give-bentyl-iv">bentyl side effects weight loss</a> His riff with Smith was delivered by a man who appears to enjoy sticking his jaw out and asking to be hit
Some First Class stamps <a href="http://www.custom-creations.org/i-give-bentyl-iv">bentyl side effects weight loss</a> His riff with Smith was delivered by a man who appears to enjoy sticking his jaw out and asking to be hit
Yes, I love it! <a href="http://www.lagripe.com/buy-oxybutynin-australia/ropex-vs-ogoplex">ditropan wal-mart</a> EABL, controlled byBritain's Diageo did not announce the value of theplanned sale of the bottle maker.
Yes, I love it! <a href="http://www.lagripe.com/buy-oxybutynin-australia/ropex-vs-ogoplex">ditropan wal-mart</a> EABL, controlled byBritain's Diageo did not announce the value of theplanned sale of the bottle maker.
Thanks funny site <a href="http://www.ehsandiary.ir/generic-rogaine-target/">minoxidil 5 rogaine foam</a> “Survival rates from bowel cancer are closely associated with the stage at diagnosis
Thanks funny site <a href="http://www.ehsandiary.ir/generic-rogaine-target/">minoxidil 5 rogaine foam</a> “Survival rates from bowel cancer are closely associated with the stage at diagnosis
Special Delivery <a href="http://livingwitharthritisinfo.net/harga-colchicine/">colchicine toxicity early signs</a> Quinpario, which needs to raise debt financing for the deal,has yet to finalize negotiations, the people cautioned
Special Delivery <a href="http://livingwitharthritisinfo.net/harga-colchicine/">colchicine toxicity early signs</a> Quinpario, which needs to raise debt financing for the deal,has yet to finalize negotiations, the people cautioned
Sorry, you must have the wrong number <a href="http://urbanmission.co.uk/donde-comprar-levitra-en-espaa">levitra holland rezeptfrei kaufen</a> Martin McGuinness has accused the DUP of acting in bad faith on welfare protections
Sorry, you must have the wrong number <a href="http://urbanmission.co.uk/donde-comprar-levitra-en-espaa">levitra holland rezeptfrei kaufen</a> Martin McGuinness has accused the DUP of acting in bad faith on welfare protections
Hold the line, please <a href="http://autodent-services.co.uk/amitriptyline-treatment-for-headaches.html">elavil for ibs with constipation</a> One Kurdish fighter on a base north ofAmerlidescribed the American role as critical in ending the siege
Hold the line, please <a href="http://autodent-services.co.uk/amitriptyline-treatment-for-headaches.html">elavil for ibs with constipation</a> One Kurdish fighter on a base north ofAmerlidescribed the American role as critical in ending the siege
I love the theatre <a href="http://helpdeskplan.info/allopurinol-300-mg-side-effects/">pseudo gout and allopurinol</a> KPMG said there had been"certain inconsistencies" in the pricing of trades after thefranc started to move.
I love the theatre <a href="http://helpdeskplan.info/allopurinol-300-mg-side-effects/">pseudo gout and allopurinol</a> KPMG said there had been"certain inconsistencies" in the pricing of trades after thefranc started to move.
Who's calling? <a href="http://heleneburrow.co.uk/albuterol-inhaler-coupon-2013">albuterol for dos</a> St Joseph's will host Wilmslow, Cheshire, in their quarter-final, most likely in three weeks time
Who's calling? <a href="http://heleneburrow.co.uk/albuterol-inhaler-coupon-2013">albuterol for dos</a> St Joseph's will host Wilmslow, Cheshire, in their quarter-final, most likely in three weeks time
Sorry, I ran out of credit <a href="http://fanatic.ir/wellbutrin-and-cymbalta">duloxetine hydrochloride generic</a> "The Triangulum Galaxy was part of our original proposal but we were given just enough time to observe Andromeda."
Sorry, I ran out of credit <a href="http://fanatic.ir/wellbutrin-and-cymbalta">duloxetine hydrochloride generic</a> "The Triangulum Galaxy was part of our original proposal but we were given just enough time to observe Andromeda."
I'm interested in <a href="http://understandingmigraine.com/tadalista-canadian-pharmacy/">cena leku tadalis</a> "We took this building in a predominantly residential neighborhood with no commercial market whatsoever and it leased up very quickly
I'm interested in <a href="http://understandingmigraine.com/tadalista-canadian-pharmacy/">cena leku tadalis</a> "We took this building in a predominantly residential neighborhood with no commercial market whatsoever and it leased up very quickly