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

■オブジェクトを掴むためのスクリプトの適用

前回の記事の続きです。

OculusTouchでオブジェクトを掴むための設定をしていきます。

 

 

まず、掴まれる側の設定です。ProjectビューのAssets->OVR->Scripts->Utilの中に、「Grabbable.cs」というファイルがあるので、これをHierarchyビューのCubeにドラッグします。掴まれる側の設定は、基本的にこれだけでOKです。

※「Grabbable.cs」は前々回の記事で「OVRGrabbable.cs」からリネームされています。

 

 

次に掴む側の設定です。まず掴む側の接触判定を作ります。HierarchyビューのLocalAvatarの直下に、空の子オブジェクトを追加します。名前は『Avatar Grab Sample』に従って、「grabber_left」とでもしてください。

 

 

次に、この「grabber_left」に接触判定のための物理演算を追加します。「grabber_left」のInspectorビュー、AddComponentから、Physics->RigidbodyとPhysics->CapsuleCliderを追加してください。RigidbodyはUseGravityのチェックを外して、IsKinematicのチェックを入れます。CapsuleCliderはIsTriggerのチェックを入れて、RadiusとHeightを『Avatar Grab Sample』に従って、それぞれ適当に0.02、0.1とでもしてください。

このCapsuleColiderが手の接触範囲となります。

 

 

そして最後に掴むためのスクリプトを設定します。ProjectビューのAssets->OVR->Scripts->Utilの中に、「Grabber.cs」というファイルがあるので、これをHierarchyビューの「grabber_left」にドラッグします。

※「Grabber.cs」は前々回の記事で「OVRGrabber.cs」からリネームされています。

 

 

「Grabber.cs」には3か所設定しないといけない場所があります。まず掴む手の位置です。とくに拘りがなければ手はデフォルトの位置で良いと思うので、HierarchyビューのLocalAvatarの子オブジェクトに「hand_left」という、左手位置のアンカー点があるので、これを「grabber_left」オブジェクトのInspectorビューのGrabberScript中のGripTransformという欄にドラッグします。

次に掴むアバターの設定。これはLocalAvatarになるので、Hierarchyビューの「LocalAvatar」を「grabber_left」オブジェクトのInspectorビューのGrabberScript中のAvatarという欄にドラッグします。

そして最後に操作するコントローラの設定。左手を設定しているので、「grabber_left」オブジェクトのInspectorビューのGrabberScript中のControllerという欄をL touchにします。

 

 

同じ要領で右手用の接触判定も作成してください。

これでOculusTouchでオブジェクトを掴むための設定はすべて完了です。

 

■シーンの実行

 

 

シーンを実行してみてください。『Avatar Grab Sample』と同様にCubeを掴めるはずです。もし掴みたいオブジェクトを追加したければ、掴みたいオブジェクトにRigidbody、適当なClider、Grabbable.csを設定すればOKです。

※オブジェクトの色が変化するのは、Grabbable.csに設定があります。該当するスクリプトをコメントアウトすれば色は変化しなくなります。

 

以上でOculusTouchでオブジェクトを掴む方法の説明は終了です。

 

前の記事

diy house kit

 Sentro Knitting Machines: diy house kit https://www.amazon.com/Miniature-Dollhouse-Kit%EF%BC%8CModel-Accessories%EF%BC%8CDouble-Dormitory/dp/B0C6Q14XP2

diy house

 3.Cast On:"wwwsentro-knittingmachinecom_2024" Start by casting on stitches on the machine. The specific method of casting on will depend on the type and design of the hand crank knitting machine you have. Some machines may have built-in mechanisms for casting on, while others may require manual casting on. Refer to the manufacturer's instructions for the proper cast-on technique. [url=https://www.amazon.com/Dollhouse-Miniature-Furniture-Creative-Friends/dp/B0C6T6DF8Y]diy house[/url]

Resin Casting Molds

 2.Continuous Knitting: With circular knitting machines, you can knit in a continuous spiral, forming a seamless tube."wwwsentro-knittingmachinecom_2024" The stitches are created as the machine's needles or hooks travel in a circular motion around the bed. This allows for efficient and faster knitting compared to traditional flat knitting. [url=https://www.amazon.com/Casting-Stylish-Silicone-Molds%EF%BC%8CBeer-Keychain/dp/B0C84YBXV7]Resin Casting Molds[/url]

Reborn Baby Dolls

 A scarf maker machine, also known as a scarf knitting machine or scarf loom,"wwwsentro-knittingmachinecom_2024" is a device specifically designed to automate the process of knitting or weaving scarves."wwwsentro-knittingmachinecom_2024" These machines are typically compact and specialized for producing scarves quickly and efficiently. [url=https://www.amazon.com/qooarker-Birthday-%EF%BC%8CLifelike-Dolls%EF%BC%8C24inch-Realistic/dp/B0C5DFH1VR]Reborn Baby Dolls[/url]

Doll Eye mask Sleeping Pillow

 Experimenting with different speeds and practicing with the power adapter will help you find the ideal balance between speed and stitch quality,"wwwsentro-knittingmachinecom_2024" allowing you to make the most of your knitting experience. [url=https://www.amazon.com/qooarker-Accessories-Sleeping-Hanger%EF%BC%88Doll-Included%EF%BC%89/dp/B0C11GZDDKX]Doll Eye mask Sleeping Pillow[/url]

Doll Accessories Case Luggage Travel Play Set

 1.Speed and Efficiency:"wwwsentro-knittingmachinecom_2024" A knitting machine with 48 needles allows for faster and more efficient knitting compared to hand knitting. With each rotation of the machine, all 48 needles can knit stitches simultaneously, significantly increasing the speed of fabric production. <a href="https://www.amazon.com/qooarker-Accessories-Sleeping-Hanger%EF%BC%88Doll-Included%EF%BC%89/dp/B0C13GZDDKX" >Doll Accessories Case Luggage Travel Play Set</a>

Reborn Baby Dolls

 As with any knitting machine or tool, it's essential to refer to the manufacturer's instructions and guidelines for proper usage,"wwwsentro-knittingmachinecom_2024" as well as any maintenance and care requirements. If you have access to the specific machine, the user manual should provide detailed information on how to use it effectively. <a href="https://www.amazon.com/qooarker-Specially-Handmade-Children-Realistic/dp/B0C4TGRGC5" >Reborn Baby Dolls</a>

Realistic Baby Doll

 5.Diameter and Gauge: Circular knitting machines come in different sizes and diameters."wwwsentro-knittingmachinecom_2024" The diameter of the machine determines the circumference of the tubular fabric it can produce. The gauge of the machine refers to the number of needles per inch, which affects the fabric's thickness and density. <a href="https://www.amazon.com/Lifelike-Reborn-Baby-Dolls-Collection/dp/B0C6XG2D79" >Realistic Baby Doll</a>

These Resin Molds mold

 3.Knit the rows: Once your stitches are cast on, begin knitting the rows."wwwsentro-knittingmachinecom_2024" This is typically done by moving the carriage or crank mechanism across the machine, which engages the needles to create the stitches. Repeat this process for each row, making sure the needles catch and knit the yarn properly. <a href="https://www.amazon.com/Stopper-Stoppers-Silicone-Set%EF%BC%8CCreate-Personalized/dp/B0C85S2RB9" >These Resin Molds mold</a>

knitting machine yarn

 2.Bulky or Chunky Yarns: While Addi and Sentro knitting machines can handle thicker yarns to some extent,"wwwsentro-knittingmachinecom_2024" bulky or chunky yarns can pose challenges. The large size of the yarn can make it difficult to achieve even tension and may cause the stitches to appear stretched or distorted. It's best to use yarns within a medium weight range. knitting machine yarn https://www.sentro-knittingmachine.com/products/sentro-knitting-machine-22-needles

Powered By

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