投稿日:2017年10月23日  カテゴリー:VR  投稿者:SingularityMaster

■はじめに

前回までの記事で、『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が重力に従って落下し、地面に着地するはずです。

 

これでプロジェクトの下準備は完了です。次の記事で、オブジェクトを掴むための設定をしていきます。

 

前の記事 次の記事

pl2NjY http://pills2sale.com/ viagra online

 pl2NjY http://pills2sale.com/ viagra online

I sing in a choir <a href="http://freeresumetemplate.net/dulcolax-yahoo-answers.html">usar dulcolax para adelgazar</a> court filing initiated by insurers four weeks ago," a spokesman for Jagger said in a statement sent to the Daily News.

 I sing in a choir <a href="http://freeresumetemplate.net/dulcolax-yahoo-answers.html">usar dulcolax para adelgazar</a> court filing initiated by insurers four weeks ago," a spokesman for Jagger said in a statement sent to the Daily News.

Excellent work, Nice Design <a href="http://oqu.com/danazol-bodybuilding-results/">danazol 200 mg</a> Police examined McQuilliams' home in north Austin and said "the residence has been secured and is safe."

 Excellent work, Nice Design <a href="http://oqu.com/danazol-bodybuilding-results/">danazol 200 mg</a> Police examined McQuilliams' home in north Austin and said "the residence has been secured and is safe."

real beauty page <a href="http://www.riseaustin.org/thioridazine-hcl-wikipedia/">thioridazine mellaril side effects</a> Richard Rose sold 5.58 million shares at 180p, leaving him with just 723,443 shares

 real beauty page <a href="http://www.riseaustin.org/thioridazine-hcl-wikipedia/">thioridazine mellaril side effects</a> Richard Rose sold 5.58 million shares at 180p, leaving him with just 723,443 shares

Not in at the moment <a href="http://toolsandgarages.com/trazodone-hydrochloride-100mg-capsules">street price trazodone 100mg</a> Construction materials are flowing in slowly because there is no money to purchase them

 Not in at the moment <a href="http://toolsandgarages.com/trazodone-hydrochloride-100mg-capsules">street price trazodone 100mg</a> Construction materials are flowing in slowly because there is no money to purchase them

Very interesting tale <a href="http://readersworld.com.au/roxithromycin-150-kaufen/">biaxsig roxithromycin 150mg side effects</a> That's the root for the exaggerated, but not baseless, claims about Washington shaping education policy.

 Very interesting tale <a href="http://readersworld.com.au/roxithromycin-150-kaufen/">biaxsig roxithromycin 150mg side effects</a> That's the root for the exaggerated, but not baseless, claims about Washington shaping education policy.

Until August <a href="http://trans-america.ca/precio-de-pastillas-yasmin-argentina">yasmin ehmke</a> Metal shards in Mac and Cheese, salmonella in Cadbury’s chocolate, horse meat in turkey burgers

 Until August <a href="http://trans-america.ca/precio-de-pastillas-yasmin-argentina">yasmin ehmke</a> Metal shards in Mac and Cheese, salmonella in Cadbury’s chocolate, horse meat in turkey burgers

Thanks funny site <a href="http://overchill.co.uk/blood-thinner-coumadin-and-inr">plavix with coumadin</a> The college which is expected to open in 2015 will provide specialist training for 17,500 maths and science teachers to improve their skills

 Thanks funny site <a href="http://overchill.co.uk/blood-thinner-coumadin-and-inr">plavix with coumadin</a> The college which is expected to open in 2015 will provide specialist training for 17,500 maths and science teachers to improve their skills

I'm in my first year at university <a href="http://www.highlandera-z.co.uk/prazosina-precio-san-pablo.htm">prazosin preis</a> The picture of a sole protester wielding his umbrella against the tear gas went viral online on Monday.

 I'm in my first year at university <a href="http://www.highlandera-z.co.uk/prazosina-precio-san-pablo.htm">prazosin preis</a> The picture of a sole protester wielding his umbrella against the tear gas went viral online on Monday.

Where do you come from? <a href="http://www.kopekoteli.com.tr/plavix-and-hairloss">fish oil plavix</a> Beating Liverpool won't be simple, but Brendan Rodgers has been moaning about the quick turn around from their Europa League trip to Besiktas

 Where do you come from? <a href="http://www.kopekoteli.com.tr/plavix-and-hairloss">fish oil plavix</a> Beating Liverpool won't be simple, but Brendan Rodgers has been moaning about the quick turn around from their Europa League trip to Besiktas

Powered By

Copyright (C) 2017 テクノロジーカフェシンギュラリティ. All Rights Reserved.