前回までの記事で、『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が重力に従って落下し、地面に着地するはずです。
これでプロジェクトの下準備は完了です。次の記事で、オブジェクトを掴むための設定をしていきます。
前の記事 次の記事
We'd like to invite you for an interview <a href="http://www.ebookmart.com.au/ensemble-meaning-outfit/">ensemble meaning in marathi</a> The report also looked at the level of social participation and connectedness among older people with an ID
We'd like to invite you for an interview <a href="http://www.ebookmart.com.au/ensemble-meaning-outfit/">ensemble meaning in marathi</a> The report also looked at the level of social participation and connectedness among older people with an ID
Other amount <a href="http://www.lagripe.com/mestinon-max-dose/ropex-vs-ogoplex">buy cheap pyridostigmine bromide</a> But he had shown the good sense to file these emails in the “drafts” folder of his account, never sending them
Other amount <a href="http://www.lagripe.com/mestinon-max-dose/ropex-vs-ogoplex">buy cheap pyridostigmine bromide</a> But he had shown the good sense to file these emails in the “drafts” folder of his account, never sending them
Insert your card <a href="http://stressmanagementarticles.com/diurex-water-pills.html">diurex max water caplets diuretic reviews</a> “People still know they’re eating at Sarge’s,” Wengrover says
Insert your card <a href="http://stressmanagementarticles.com/diurex-water-pills.html">diurex max water caplets diuretic reviews</a> “People still know they’re eating at Sarge’s,” Wengrover says
I've been cut off <a href="http://plateroytu.com/bupropion-and-ecgc-interactions">bupropion sexual side effects</a> 9, Germans still express frustration at how far behind the eastern economy remains
I've been cut off <a href="http://plateroytu.com/bupropion-and-ecgc-interactions">bupropion sexual side effects</a> 9, Germans still express frustration at how far behind the eastern economy remains
What part of do you come from? <a href="http://plateroytu.com/bupropion-and-ecgc-interactions">bupropion price</a> A break there could see the market aim for the 2014high of 105.45 set in January.
What part of do you come from? <a href="http://plateroytu.com/bupropion-and-ecgc-interactions">bupropion price</a> A break there could see the market aim for the 2014high of 105.45 set in January.
I'll put him on <a href="http://www.kopekoteli.com.tr/paxil-and-abdominal-weight-gai">interact etodolac lipitor paxil</a> He became upset about the conditions we worked under: too little money, fear of losing the contract, too much pressure."
I'll put him on <a href="http://www.kopekoteli.com.tr/paxil-and-abdominal-weight-gai">interact etodolac lipitor paxil</a> He became upset about the conditions we worked under: too little money, fear of losing the contract, too much pressure."
very best job <a href="http://www.trustee.org.cn/tadapox-diskuze/">achat tadapox</a> However, the networks have suggested the company was so indebted that it was not able to make money without unrealistic payments from operators
very best job <a href="http://www.trustee.org.cn/tadapox-diskuze/">achat tadapox</a> However, the networks have suggested the company was so indebted that it was not able to make money without unrealistic payments from operators
Will I get paid for overtime? <a href="http://www.kopekoteli.com.tr/paxil-and-abdominal-weight-gai">paroxetine hydrochloride side effects</a> This survey looks at the experiences of 97 completed member option exercises, covering over 180,000 members
Will I get paid for overtime? <a href="http://www.kopekoteli.com.tr/paxil-and-abdominal-weight-gai">paroxetine hydrochloride side effects</a> This survey looks at the experiences of 97 completed member option exercises, covering over 180,000 members
We were at school together <a href="http://oqu.com/duricef-500-mg-capsule/">cefadroxil dosage for infants</a> Meanwhile, Louise is having issues with her longtime boyfriend Jonathan (William Jackson Harper)
We were at school together <a href="http://oqu.com/duricef-500-mg-capsule/">cefadroxil dosage for infants</a> Meanwhile, Louise is having issues with her longtime boyfriend Jonathan (William Jackson Harper)
We need someone with qualifications <a href="http://www.a1accommodation.com.au/bisoprolol-10mg-kaufen">bisoprolol flatulence</a> The pound has been through a dramatic (in market terms) fall since early June when it was trading above $1.71.
We need someone with qualifications <a href="http://www.a1accommodation.com.au/bisoprolol-10mg-kaufen">bisoprolol flatulence</a> The pound has been through a dramatic (in market terms) fall since early June when it was trading above $1.71.