前回までの記事で、『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が重力に従って落下し、地面に着地するはずです。
これでプロジェクトの下準備は完了です。次の記事で、オブジェクトを掴むための設定をしていきます。
前の記事 次の記事
I'm afraid that number's ex-directory <a href="http://www.lasvegascomplaints.com/hydrochlorothiazide-25-mg-over-the-counter/">hyzaar bad</a> One of the injured has life-threatening wounds and the perpetrators are still at large, police said.
I'm afraid that number's ex-directory <a href="http://www.lasvegascomplaints.com/hydrochlorothiazide-25-mg-over-the-counter/">hyzaar bad</a> One of the injured has life-threatening wounds and the perpetrators are still at large, police said.
Could you ask him to call me? <a href="http://fanatic.ir/captopril-capoten">capoten first dose</a> The decline in its share price also pulleddown rivals such as J Sainsbury and Wm Morrison.
Could you ask him to call me? <a href="http://fanatic.ir/captopril-capoten">capoten first dose</a> The decline in its share price also pulleddown rivals such as J Sainsbury and Wm Morrison.
Could you please repeat that? <a href="http://drandrewbrown.co.uk/precio-calandria-acapulco.html">prezzo calandra mercury</a> "Coils have a physical limitation that won'tchange with size," said Humavox's Lachman
Could you please repeat that? <a href="http://drandrewbrown.co.uk/precio-calandria-acapulco.html">prezzo calandra mercury</a> "Coils have a physical limitation that won'tchange with size," said Humavox's Lachman
I was made redundant two months ago <a href="http://brain-stream.org/cena-aleve/">aleve direct therapy walgreens</a> Hard-pressed GPs might feel immediate help is needed to reduce the pressure on their practices
I was made redundant two months ago <a href="http://brain-stream.org/cena-aleve/">aleve direct therapy walgreens</a> Hard-pressed GPs might feel immediate help is needed to reduce the pressure on their practices
We'd like to invite you for an interview <a href="http://gokceksifa.com.tr/sucralfate">sucralfate side effects mayo clinic</a> For $19.99 a month, subscribers have access to millions of songs and videos in high fidelity
We'd like to invite you for an interview <a href="http://gokceksifa.com.tr/sucralfate">sucralfate side effects mayo clinic</a> For $19.99 a month, subscribers have access to millions of songs and videos in high fidelity
I'd like some euros <a href="http://studentfinanceadvisor.co.uk/ranitidine-a-new-h2-receptor-antagonist">zantac toddler diarrhea</a> In Tehran, there remains deep internal opposition to any deal to end Iran’s nuclear weapons program
I'd like some euros <a href="http://studentfinanceadvisor.co.uk/ranitidine-a-new-h2-receptor-antagonist">zantac toddler diarrhea</a> In Tehran, there remains deep internal opposition to any deal to end Iran’s nuclear weapons program
Not available at the moment <a href="http://www.coachhiredirectory.co.uk/erectafil-20-dosage/">tadalafil tablets erectafil 20</a> The card is also a travel document, conforming to the same standards as international passports
Not available at the moment <a href="http://www.coachhiredirectory.co.uk/erectafil-20-dosage/">tadalafil tablets erectafil 20</a> The card is also a travel document, conforming to the same standards as international passports
I'm sorry, I'm not interested <a href="http://www.plaw.ir/ayurslim-powder-reviews">ayurslim himalaya cijena</a> I'm calling [Women on the Verge] a play with music, which is how I get through it
I'm sorry, I'm not interested <a href="http://www.plaw.ir/ayurslim-powder-reviews">ayurslim himalaya cijena</a> I'm calling [Women on the Verge] a play with music, which is how I get through it
I like watching football <a href="http://www.squadguru.com/doxazosin-prezzo/">4 cardura</a> Quarterback Kenny Hill who already has over 1000 yards passing (1094) and 11 touchdowns leads the offense this season
I like watching football <a href="http://www.squadguru.com/doxazosin-prezzo/">4 cardura</a> Quarterback Kenny Hill who already has over 1000 yards passing (1094) and 11 touchdowns leads the offense this season
Children with disabilities <a href="http://neec2010.co.uk/precio-del-minocin-en-mexico.aspx">precio del minocin en mexico</a> Colleen Kelly, a gastroenterologist at the Warren Alpert Medical School of Brown University.
Children with disabilities <a href="http://neec2010.co.uk/precio-del-minocin-en-mexico.aspx">precio del minocin en mexico</a> Colleen Kelly, a gastroenterologist at the Warren Alpert Medical School of Brown University.