Skip to content

Getting Started꞉ Play Scene

Zach Kinstner edited this page Nov 2, 2016 · 2 revisions

On this page, you'll learn how to interact with items by manually moving a cursor via its transforms. This is useful for simulating the use of a 3D input device, like the Leap Motion Controller.

Instructions

Play Scene 📷 Using cursors to interact with items (in a playing scene)

  1. Complete the Scene Setup, Checkbox Item, and Slider Item steps.
  2. Set the CheckboxItem and SliderItem transform positions so that they are at least 0.2 units in front of the cursors, and roughly 0.2 units above them. The goal here is to avoid immediate interactions (upon hitting play) between the items and the cursors.
  3. Hit "play" in Unity.
  4. Select the HoverKit/Cursors/LeftHand/LeftIndex object via the Unity inspector.
  5. Move LeftIndex (via transform) near to CheckboxItem.
    1. As the cursor approaches, notice CheckboxItem fill up with its "highlight" color.
    2. Once the "highlight" reaches 100%, notice CheckboxItem rapidly fill up with its "selection" color.
    3. Once the "selection" color reaches 100%, notice that CheckboxItem toggles to a new checkbox value, and glows briefly with its "flash" color.
  6. Move LeftIndex (via transform) near to the "handle" part of SliderItem.
    1. Once the "handle" part flashes, it stays "sticky-selected".
    2. As you move the cursor along the slider track, notice how the handle follows the slider, and the slider's value (and label) changes based upon its position.
    3. As you move the cursor away from the handle, notice how the CheckboxItem's "selection" color retreats.
    4. Once the "selection" color reaches 0%, the "sticky-selection" is released.
  7. Select the HoverKit/Cursors/Look object via the Unity inspector.
  8. Move and rotate Look (via transform). Note that Look is configured to be a "raycast" cursor.
    1. As the Look transform changes, notice how its ray does (or doesn't) collide with an item.
    2. Notice how the items behave as if the cursor is placed at the collision point between the item and the cursor's ray.
Clone this wiki locally