前回までの記事で、『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が重力に従って落下し、地面に着地するはずです。
これでプロジェクトの下準備は完了です。次の記事で、オブジェクトを掴むための設定をしていきます。
前の記事 次の記事
An estate agents <a href="http://zobbing.co.uk/tadapox-tadalafildapoxetine-80mg">tadapox opinioni</a> 5 snap poll in Bulgaria, the European Union's poorest country and one of its most corrupt.
An estate agents <a href="http://zobbing.co.uk/tadapox-tadalafildapoxetine-80mg">tadapox opinioni</a> 5 snap poll in Bulgaria, the European Union's poorest country and one of its most corrupt.
Another year <a href="http://www.asiantbi.org/triamterene-hydrochlorothiazide">triamterene hctz and losartan potassium</a> After the verdict was ruled out the court erupted into chants of “Down, down with military rule”.
Another year <a href="http://www.asiantbi.org/triamterene-hydrochlorothiazide">triamterene hctz and losartan potassium</a> After the verdict was ruled out the court erupted into chants of “Down, down with military rule”.
Incorrect PIN <a href="http://www.italian-tuition.co.uk/prix-havana-club-maximo.html">abk soleras avana preis</a> Carriers control the code on the SIM, for example, and thisis one possible way to access data on the phone
Incorrect PIN <a href="http://www.italian-tuition.co.uk/prix-havana-club-maximo.html">abk soleras avana preis</a> Carriers control the code on the SIM, for example, and thisis one possible way to access data on the phone
This is your employment contract <a href="http://vaccineresource.com/vital-erexin-spray/">rexine material hsn code</a> However the website's coverage of Egypt's affairs shows a dislike of its new rulers
This is your employment contract <a href="http://vaccineresource.com/vital-erexin-spray/">rexine material hsn code</a> However the website's coverage of Egypt's affairs shows a dislike of its new rulers
International directory enquiries <a href="http://tashilat.ir/star-trek-tricorder-app-apple">tricor mvi</a> Her partner could then use this leave to help out in the first few weeks after birth while she is still on maternity leave.
International directory enquiries <a href="http://tashilat.ir/star-trek-tricorder-app-apple">tricor mvi</a> Her partner could then use this leave to help out in the first few weeks after birth while she is still on maternity leave.
I need to charge up my phone <a href="http://www.panjerehweekly.ir/crestor-side-effects-rxlist/does-cbd-oil-working-for-anxiety-in-dogs-not-pregnant">cheap crestor 20mg</a> However, there are other problems that doctors still need to study and understand
I need to charge up my phone <a href="http://www.panjerehweekly.ir/crestor-side-effects-rxlist/does-cbd-oil-working-for-anxiety-in-dogs-not-pregnant">cheap crestor 20mg</a> However, there are other problems that doctors still need to study and understand
We need someone with qualifications <a href="http://www.ebookmart.com.au/plavix-and-cialis-taken-together/">antacid interactions with plavix</a> "Eventually, basically, meet up at pretty much the same place where George is going
We need someone with qualifications <a href="http://www.ebookmart.com.au/plavix-and-cialis-taken-together/">antacid interactions with plavix</a> "Eventually, basically, meet up at pretty much the same place where George is going
Will I have to work on Saturdays? <a href="http://heraldrybydesign.com/prezzo-havana-club-aejo-especial">precio havana club ron</a> Charles Schwab, chairman of his eponymous firm, took home $4.97 million in 2014, down 9.4 percent from 2013
Will I have to work on Saturdays? <a href="http://heraldrybydesign.com/prezzo-havana-club-aejo-especial">precio havana club ron</a> Charles Schwab, chairman of his eponymous firm, took home $4.97 million in 2014, down 9.4 percent from 2013
I'd like to tell you about a change of address <a href="http://purelove.dk/dexamethasone-eye-drops-side-effects-in-dogs.htm">dexamethasone iv oral</a> The volunteers are far more focussed on winning than before, said one party figure
I'd like to tell you about a change of address <a href="http://purelove.dk/dexamethasone-eye-drops-side-effects-in-dogs.htm">dexamethasone iv oral</a> The volunteers are far more focussed on winning than before, said one party figure
Hello good day <a href="http://www.kopekoteli.com.tr/toprol-xl-50">interactions of toprol and melatonin</a> However, his preferred university delayed releasing him within UCAS and eventually offered him a place
Hello good day <a href="http://www.kopekoteli.com.tr/toprol-xl-50">interactions of toprol and melatonin</a> However, his preferred university delayed releasing him within UCAS and eventually offered him a place