Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step 1: Unity SDK - VR Grabbable

  1. In the Hierarchy, find the object you wish to make grabbable. We use the “brush” in this case. It can be any object

  2. Right click on the object .

  3. Select Motive - > Make Grabbable

  4. In the Inspector, notice that three components have been added to the object

    1. A Rigidbody

    2. A Mesh Collider

    3. VR Grabbable script

  5. Make the Mesh Collider = Convex

  6. Save the Scene and play it

  7. Play the Scene

  8. Pick up the brush. Notice that the brush can be picked up from any point. Specific grab points can be defined in the VR Grabbable script

    1. Optional: Add a grab anchor to the handle. A grab anchor is a transform. You can use the buttons to define a grab anchor for either hand or you can create your own and assign it

    2. Optional: Options for release behavior, distance grabs and more can be configured in the VR Grabbable script component

The object is now able to be picked up in VR. You can configure the specific behavior based on your use case.

Step 2: Unity SDK - Motive Scene Object

To be usable with Storyflow, add a Motive Scene Object script and give it a name.

  1. Right click on the object.

  2. Select Motive - > Make Scene Object

  3. In the name field, type a name

    1. Remember this name. A Catalog item with the same name will need to be created in a Storyflow Catalog

    2. For this example, the name will be 'Brush'

  4. Save the Scene

At this point, everything that is needed has been configured in Unity

Step 3: Storyflow - Named Object Catalog Item

  1. In Storyflow, go to the Catalogs tab and find a Named Object catalog Catalog

    1. If one does not exist, create one

  2. Add an item to the Catalog

  3. Select the item and give it the same name that was given to the Motive Scene Object

    1. In this case, the name is Brush

  4. Save the Catalog

Step 4: Storyflow - Create a Test Script

  1. Go to the Scenarios tab

  2. Create a new Script called Test Grasp - VR Grabbable

  3. Open the Script to edit

  4. Add a Scene Object Resource

  5. Click the '+ ' button icon on the Object field

  6. Select the object you added to the Catalog

    1. The example used the name Brush

  7. Add a Frame

  8. Drag in the Grasp Resource and select the object ('Brush') from the World Object drop down menu

  9. Click the Event Link Shortcut (the blue "+" button) and select “complete” complete

  10. In the newly created Frame, add a drag and drop in a Notification Resource (Playable Content -> Notification )

  11. Enter some text in the Message field

    1. Optional: Give the Notification a sound or an image if you'd like

  12. Save the Script. When this Script is run in the VR Scene, it will wait until the object (Brush) is picked up

    1. When it is, the Notification will display

  13. Click the Project tab

  14. Assign the Test Grasp - VR Grabbable Script to a Scenario. If no Scenario exists, create one

  15. Save the Scenario

Step 5: Unity - Run the Test Script

  1. In Unity, play the Scene and select the Scenario

  2. Pick up the object (Brush).

    1. Notice that the Notification shows once it is picked up

...