前回までの記事で、『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が重力に従って落下し、地面に着地するはずです。
これでプロジェクトの下準備は完了です。次の記事で、オブジェクトを掴むための設定をしていきます。
前の記事 次の記事
Please wait <a href="http://na-da.co.jp/bystolic-costco">bystolic generic launch</a> The defense stepped up again when Dontae Johnson returned an interception return for a TD in the final minute to seal it.
Please wait <a href="http://na-da.co.jp/bystolic-costco">bystolic generic launch</a> The defense stepped up again when Dontae Johnson returned an interception return for a TD in the final minute to seal it.
I'm only getting an answering machine <a href="http://www.cellulitereviews.org/famvir-powered-by-phpbb/">famciclovir famvir</a> The charity is again calling on the Government to raise rent supplement rates and introduce better regulation of rents
I'm only getting an answering machine <a href="http://www.cellulitereviews.org/famvir-powered-by-phpbb/">famciclovir famvir</a> The charity is again calling on the Government to raise rent supplement rates and introduce better regulation of rents
Pleased to meet you <a href="http://urbanmission.co.uk/prix-bague-ginette-ny-onyx">la vida interior ginette paris pdf</a> In the second rubber, Krajinovic had a simple game plan against Somdev Devvarman – to attack the ball
Pleased to meet you <a href="http://urbanmission.co.uk/prix-bague-ginette-ny-onyx">la vida interior ginette paris pdf</a> In the second rubber, Krajinovic had a simple game plan against Somdev Devvarman – to attack the ball
This is your employment contract <a href="http://www.eidon.se/crestor-prix-quebec/">crestor generic cost</a> Each of us gave different pieces of advice: do not take a cab; only travel in the women's metro compartment; do not take a bus
This is your employment contract <a href="http://www.eidon.se/crestor-prix-quebec/">crestor generic cost</a> Each of us gave different pieces of advice: do not take a cab; only travel in the women's metro compartment; do not take a bus
Sorry, I'm busy at the moment <a href="http://www.coachhiredirect.co.uk/medicament-sildalis/">buy sildalis online</a> The European Commission has 25 working days after a deal is filed for a first-stage review
Sorry, I'm busy at the moment <a href="http://www.coachhiredirect.co.uk/medicament-sildalis/">buy sildalis online</a> The European Commission has 25 working days after a deal is filed for a first-stage review
Do you like it here? <a href="https://jewelsmall.com/buy-propecia-finasteride-online-vjcr">where to buy propecia in australia</a> 9/12/09 57 32 25 33 12 21 10
Do you like it here? <a href="https://jewelsmall.com/buy-propecia-finasteride-online-vjcr">where to buy propecia in australia</a> 9/12/09 57 32 25 33 12 21 10
I'm unemployed <a href="http://www.kiralikevara.com/levothyroxine-and-liver/">levothyroxine synthroid adverse effects</a> This information is not used by us for any other type of audience recording or monitoring.
I'm unemployed <a href="http://www.kiralikevara.com/levothyroxine-and-liver/">levothyroxine synthroid adverse effects</a> This information is not used by us for any other type of audience recording or monitoring.
Insert your card <a href="http://www.squadguru.com/tadapox-italia/">tadapox wikipedia</a> The laser is tuned to the frequencies that cause two enzymes in the cells to glow or fluoresce
Insert your card <a href="http://www.squadguru.com/tadapox-italia/">tadapox wikipedia</a> The laser is tuned to the frequencies that cause two enzymes in the cells to glow or fluoresce
I'm in my first year at university <a href="http://comfortwoodcottage.co.uk/nasonex-spray-active-ingredient">merck nasonex coupon 2018</a> One of the women is a partner overseeing marketing and investor relations, but not investing itself.
I'm in my first year at university <a href="http://comfortwoodcottage.co.uk/nasonex-spray-active-ingredient">merck nasonex coupon 2018</a> One of the women is a partner overseeing marketing and investor relations, but not investing itself.
Please wait <a href="http://kaimo.dk/actos-publicos-partido-de-la-costa-2013/">ir spectrum of pioglitazone</a> There’s a 4.5-inch display, a 1.3GHz quad-core processor, and a 5-megapixel camera
Please wait <a href="http://kaimo.dk/actos-publicos-partido-de-la-costa-2013/">ir spectrum of pioglitazone</a> There’s a 4.5-inch display, a 1.3GHz quad-core processor, and a 5-megapixel camera