Versions Compared

Key

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

...

  1. Open your Unity project and in the scene Hierarchy window select (World > Example Assets > Props > Workbench > Workbench_LOD0 > Bench Top)

  2. Under the Mesh Collider component turn Is Trigger” Trigger to off

  3. Scroll down to the bottom of the Inspector window and select (Add Component > (Type in “Rigidbody”) > Rigidbody)

  4. In the Rigidbody component toggle “Use Gravity” Use Gravity to off

  5. Toggle “Is Kinematic” Is Kinematic to on

  6. Then in the Hierarchy window select (World > Example Assets > Props > Workbench > Stud > Stud)

  7. In the Rigidbody component toggle “Use Gravity” Use Gravity to off

  8. Toggle “Is Kinematic” Is Kinematic to on

  9. Set your Collision Detection to Discrete

  10. In the Mesh Collider component, toggle “Is Trigger” Is Trigger to off

  11. Right-click on Stud in the Hierarchy window and select (Motive > Make Grabbable)

  12. Scroll down to the new Mesh Collider component and delete it by selecting the *Three dots* on the top right of the component, then select Remove Component

  13. In the new VR Grabbale component, make sure that “Allow Allow Distance Grab” Grab is toggled off

  14. In the Snap Position and Snap Orientation dropdown menus, make sure both values are set to “Never”

  15. Toggle “Track Orientation” Track Orientation to off

  16. Set “Release Behaviour” Release Behaviour to “Leave Leave In Place”Place

  17. Then change “Move Mode” Move Mode to “Physics”Physics

  18. While you are still in the Stud Inspector window scroll down to the bottom and select (Add Component > (Type in “String State Setter”) > String State Setter)

  19. In the State textbox type Plank Position

  20. Back in the Hierarchy window right-click on “Stud”Stud and select (Motive > Joints > Add Sliding Joint)

  21. In the new Sliding Joint component under Axis change the “X value” X value to 0 and set the “Y value” Y value to 1

  22. Under Secondary Axis set the “X value” X value to 1 and the “Y value” Y value to 0

  23. Next, select the *Target* icon for the Connected Rigidbody area and then select “Bench Top” Bench Top

  24. Then, toggle “Limit Motion” Limit Motion to On

  25. In the “Lower Lower Limit text area type” type as -0.2” 2 and for the “Upper Upper Limit type” type as “00.4”4

  26. Expand the “Upper Stop” Upper Stop dropdown menu and “Under Under Limit Threshold” Threshold type “00.2”2

  27. Next in the “In In Limit() area” area hit the + icon then drag “Stud” Stud from your Hierarchy window into the box that reads “None None (Object)

  28. Then, expand the “No Function” No Function dropdown menu and select (StringStateSetter > SetState (String))

  29. In the *Newly Created Textbox* type Outside

  30. Expand the “Lower Stop” Lower Stop dropdown menu and “under under Limit Threshold type” type to “00.1”1

  31. Next in the “In In Limit() area” area hit the + icon then drag “Stud” Stud from your Hierarchy window into the box that reads None (Object)

  32. Then, expand the “No Function” No Function dropdown menu and select (StringStateSetter > SetState (String))

  33. In the *Newly Created Textbox* type Inside

  34. Save the Scene

Setup - Storyflow

...

Storyflow

...

  1. Select the *Three Bullet List* icon on the right side of the screen (Reference Image Below)

  2. Next, select New Enum Name and type “Plank Position” Plank Position

  3. After that, hit the > left of where it reads Plank Position and then select New Enum Item Name then type “Inside” Inside

  4. Do this a second time but type “Outside” Outside

  5. Open Storyflow and select the Catalogs tab

  6. If you do not have a “Named Object” catalog Catalog already, select (Create > Select Type > Named Object > (Type a name) > Create)

  7. Open your “Named Object“ catalog Catalog then select (+ > Named Anchor > (Type in “Stud”) > Save)

  8. Save the catalogCatalog

  9. If you do not have a “Behaviour Model” catalog Catalog already, select (Create > Select Type > Behaviour Model > (Type a name) > Create)

  10. Open your “Behaviour Mode“ catalog Catalog then select (+ > Behaviour Model > (Type in “Stud Behaviour Model”))

  11. Then select (States + > (Type in “Plank Position”Plank Position))

  12. Expand the Primitive dropdown menu and change it to Enum

  13. After that, expand the NOT SET dropdown menu and select Plank Position

  14. Save the catalogCatalog

  15. Open the Scenarios tab and select (+ Add Create a New Script > (Type a name) >
    Checkmark > (Newly Created Script))

  16. Open the new Script

  17. Under Resources on the right side of the screen click and drag the “Scene Object” resource Scene Object Resource into
    the grey area in the center of the screen

  18. Select (Object + > (Your Named Object catalog) > Stud)

  19. In the same grey area mentioned before put the “Behaviour Model” resource there, drag and drop in the Behaviour Model Resource

  20. Select (Targets + > Stud)

  21. Then, select (Behaviour Model > (Your Behaviour Model catalog) > Stud Behaviour Model)

  22. Select the + sign icon attached to the “Main Frame” on the left side of the screen to create a new Frame

  23. Select the newly created frame Frame and in the same grey area mentioned before put , drag and drop in the
    “Set Object State” resource thereSet Object State Resource

  24. Select (World Objects + > Stud)

  25. Then, select (Behaviour Model > (Your Behaviour Model catalog) > Stud Behaviour Model)

  26. Select (CHOOSE STATE > Plank Position > Compare +)

  27. In the new Value dropdown list select Outside

  28. Next, select the blue + icon on the bottom right of the Set Object State resource, scroll down the list that appears and select Close

    1. In the newly created frame, add the “Notification” resource Notification Resource and under Message type “Outside” Outside

  29. Again, select the + sign icon attached to the “Main Frame” Main Frame on the left side of the screen

  30. Select the newly created frame Frame and in the same grey area mentioned before put , drag and drop in the
    “Set Object State” resource thereSet Object State Resource

  31. Select (World Objects + > Stud)

  32. Then, select (Behaviour Model > (Your Behaviour Model catalog) > Stud Behaviour Model)

  33. Select (CHOOSE STATE > Plank Position > Compare +)

  34. In the new Value dropdown list select Inside

  35. Next, select the blue + icon on the bottom right of the Set Object State resource, scroll down the list that appears and select Close

  36. In the newly created frame Frame, add the “Notification” resource Notification Resource and under Message type “Inside” Inside

  37. Select Save on the top left of the screen

  38. Next, select the Project tab on the top of your screen then go (Create > Script + >
    [Project name] Scripts > (Your new script) > Title > (Type a new scenario title) >
    Save)

You can now open your Unity project select Project. Select the newly created scenarioScenario, once it has loaded you should be able to grasp the Stud from the workbench, slide it to the left, and read your new Notifications!

...