前回までの記事で、『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が重力に従って落下し、地面に着地するはずです。
これでプロジェクトの下準備は完了です。次の記事で、オブジェクトを掴むための設定をしていきます。
前の記事 次の記事
How do I get an outside line? <a href="http://theformationquest.org/midamorphine-uses.htm">buy midamor</a> However these are the two most common types - serous and endometriod ovarian cancer.
How do I get an outside line? <a href="http://theformationquest.org/midamorphine-uses.htm">buy midamor</a> However these are the two most common types - serous and endometriod ovarian cancer.
An estate agents <a href="http://oqu.com/fybogel-mebeverine-nhs/">fybogel mebeverine</a> “Kevin’s family run a couple of restaurants so he knew the business,” he says
An estate agents <a href="http://oqu.com/fybogel-mebeverine-nhs/">fybogel mebeverine</a> “Kevin’s family run a couple of restaurants so he knew the business,” he says
Languages <a href="http://dr123.me/vermox-avec-ou-sans-ordonnance">can i get mebendazole over the counter</a> He is here despite two straight losing seasons because of all the winning he’s done in the past
Languages <a href="http://dr123.me/vermox-avec-ou-sans-ordonnance">can i get mebendazole over the counter</a> He is here despite two straight losing seasons because of all the winning he’s done in the past
We used to work together <a href="http://www.emlv.org/20-mg-amitriptyline-pregnancy">amitriptyline hydrochloride tablets 25 mg</a> Vinson went to Ohio over the weekend on FrontierAirlines while running a slight fever.
We used to work together <a href="http://www.emlv.org/20-mg-amitriptyline-pregnancy">amitriptyline hydrochloride tablets 25 mg</a> Vinson went to Ohio over the weekend on FrontierAirlines while running a slight fever.
Have you read any good books lately? <a href="http://realgh.com/betamethasone-dipropionate-ointment-price">betnovate n cream indication</a> But beyond the breathtaking diplomatic opportunity the thaw between Cuba and the U.S
Have you read any good books lately? <a href="http://realgh.com/betamethasone-dipropionate-ointment-price">betnovate n cream indication</a> But beyond the breathtaking diplomatic opportunity the thaw between Cuba and the U.S
magic story very thanks <a href="http://overchill.co.uk/fenofibrate-lipanthyl-supra">tricore labs woodward</a> A stroke occurs when the blood supply to the brain is interrupted, depriving it of oxygen
magic story very thanks <a href="http://overchill.co.uk/fenofibrate-lipanthyl-supra">tricore labs woodward</a> A stroke occurs when the blood supply to the brain is interrupted, depriving it of oxygen
How do I get an outside line? <a href="http://comfortwoodcottage.co.uk/famvir-famciclovir-cost">famvir and shingles</a> The creepy missive was written in unique block letters and misspelled the word “Beverly.”
How do I get an outside line? <a href="http://comfortwoodcottage.co.uk/famvir-famciclovir-cost">famvir and shingles</a> The creepy missive was written in unique block letters and misspelled the word “Beverly.”
Other amount <a href="http://vonjuliet.com.tr/midamor-dosage">midamor yahoo answers</a> By 2013, Lithuania was spending just 0.8 percent of GDP on defense, the second smallest share of NATO countries after Luxemburg.
Other amount <a href="http://vonjuliet.com.tr/midamor-dosage">midamor yahoo answers</a> By 2013, Lithuania was spending just 0.8 percent of GDP on defense, the second smallest share of NATO countries after Luxemburg.
I'd like to transfer some money to this account <a href="http://vonjuliet.com.tr/midamor-dosage">midamor yahoo answers</a> The Vodafone contract, which ends in February next year, wascrucial to the business
I'd like to transfer some money to this account <a href="http://vonjuliet.com.tr/midamor-dosage">midamor yahoo answers</a> The Vodafone contract, which ends in February next year, wascrucial to the business
How many weeks' holiday a year are there? <a href="http://heleneburrow.co.uk/duetact-generic">duetact side effects</a> Greek issues aside, the SNB faces pressure because the ECBis fighting its own war against deflation, which calls out for aweaker euro
How many weeks' holiday a year are there? <a href="http://heleneburrow.co.uk/duetact-generic">duetact side effects</a> Greek issues aside, the SNB faces pressure because the ECBis fighting its own war against deflation, which calls out for aweaker euro