Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
panelIconId1f393
panelIcon:mortar_board:
panelIconText🎓
bgColor#4C9AFF

In depth learning on Attachables is found in this course in Motive Academy.

Table of Contents
minLevel1
maxLevel6
outlinefalse
typelist
printablefalse

Overview

This article describes how you can implement Motive’s premade Attachable components in order to make two objects interact with one another in a VR scene. One object will be able to be grabbed and then subsequently placed on the receiver object. This tutorial will also include information on how to use this functionality in combination with Storyflow.

Important: Any object that will be used as part of a training procedure authored in Storyflow must be a Motive Scene Object.

...

Setup - Unity SDK

  1. Open your Unity project and in the scene Hierarchy window find “Hammer”

...

  1. World > Example Assets > Props > Workbench > Hammer

...

  1. Right-click on the Hammer then select

...

  1. Motive > Make Attachable

...

  1. In the Hammer Inspector window scroll down until you find the VR Attachable component

    1. Scroll to the bottom of the component and expand the Attaches To dropdown list

    2. Increase the Size to 1

    3. Element 0 will appear, and from there you need to expand it and under Type write “Test”

  2. In the scene Hierarchy window find “Stud”

...

  1. World > Example Assets > Props > Workbench > Stud > Stud

...

  1. Right-click on the Stud then select

...

  1. Motive > Make Attach Receiver

...

  1. In the Stud Inspector window scroll down until you find the VR Attachable Receiver component

    1. Scroll to the bottom of the component and expand the Receivers dropdown list

    2. Increase the Size to 1

    3. Element 0 will appear, and from there you need to expand it and under Type write “Test”

    4. Change Max Attachments to 1

    5. A bit higher in the component toggle Attach to Surface to on

  2. Save the

...

  1. Scene

Setup - Storyflow

  1. Open Storyflow and select the Catalogs tab

  2. If you do not have a “named Object”

...

  1. Catalog already, select

...

  1. Create > Select Type > Named Object > (Type a name) > Create

...

  1. Open your “Named Object “

...

  1. Catalog then select

...

  1. + > Named Object > (Type in “Stud”) > Save

...

    1. Do this twice but for the second object write “Hammer

  1. Save the

...

  1. Catalog

  2. Open the Scenarios tab and

...

  1. Create a New Script

...

  1. , then open it

  2. Under Resources on the right side of the screen click and drag the

...

  1. Scene Object Resource into
    the grey area in the center of the screen

    1. Select

...

    1. Object + > (Your Named Object catalog) > Stud > Save

      1. Do this twice but for the second object select Hammer

  1. Select the +

...

  1. icon attached to the “Main Frame” on the left side of the screen

  2. Select the newly created frame and in the same grey area mentioned before put the

...

  1. Place Resource there

    1. Place can be typed into the Resource search bar for easy access

  2. Select the drop-down menu under World Objects and select Hammer

  3. Select the drop-down menu under Targets and select Stud

  4. Select the drop-down menu under Event and select Complete then select the + icon right of the drop-down menu

  5. In the newly created frame and in the same grey area mentioned before put the

...

  1. Notification Resource there

  2. Under Message type

...

  1. Great work

  2. Select Save on the top left of the screen

...

  1. Create

...

  1. a Scenario if you don’t have one already

  2. Link the Script you created to the Scenario

You can now open your Unity project Project select the newly created scenarioScenario, grab the hammer from the backside of the workbench and place it onto the wooden stud on top of the workbench!

(If you can’t reach the Hammer remember you can teleport by pressing forward on your remote joysticks)

Related Articles

Recipes