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
Open your Unity project and in the scene Hierarchy window find “Hammer” (World > Example Assets > Props > Workbench > Hammer)
Right-click on the Hammer then select (Motive > Make Attachable)
In the Hammer Inspector window scroll down until you find the VR Attachable component
Scroll to the bottom of the component and expand the Attaches To dropdown list
Increase the Size to 1
Element 0 will appear, and from there you need to expand it and under Type write “Test”
In the scene Hierarchy window find “Stud” (World > Example Assets > Props > Workbench > Stud > Stud)
Right-click on the Hammer then select (Motive > Make Attach Receiver)
In the Stud Inspector window scroll down until you find the VR Attachable Receiver component
Scroll to the bottom of the component and expand the Receivers dropdown list
Increase the Size to 1
Element 0 will appear, and from there you need to expand it and under Type write “Test”
Change Max Attachments to 1
A bit higher in the component toggle Attach to Surface to on
Save the scene
Setup - Storyflow
Open Storyflow and select the Catalogs tab
If you do not have a “named Object” catalog already, select (Create > Select Type > Named Object > (Type a name) > Create)
Open your “Named Object “ catalog then select (+ > Named Object > (Type in “Stud”) > Save)
Do this twice but for the second object write “Hammer”
Save the catalog