0c Unity Maya Vive Teleport, Throw, and Interact with Animation

smallarrows.GIF

In Unity:
Select NEW
Give your project a name such as 0c_Tutorial


Import SteamVR

Type SteamVR in the search bar of the Asset Store tab.
unity_VR_steam_plugin


Add the SteamVR Player Prefab to your scene
Select the SteamVR folder from the Project tab
Select  InteractionSystem->Core->Prefabs
Drag the Player into the Hierarchy tab


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Setup the Main Camera to be out of the way or used later
Select the Main Camera from the Hierarchy tab
     Change Target Display to Display 2

     Change Target Eye to None in the Inspector tab
(The main camera interferes with the Vive camera if you do not do this.)


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Teleporting
Drag in the Teleporting prefab
from SteamVR->InteractionSystem->Teleport->Prefabs into the Hierarchy tab.
Create a New Cube, GameObject->3D Object->Cube. Scale this one up to be the floor for the whole scene.
Make a Plane for the teleport area. GameObject->3D Object->Plane It should be located above your cube

Add the Teleport Area component to the plane
     Select the plane, use Add Component
          search for tele select Teleport Area
This will allow the player to teleport anywhere along this plane.


You can now test your scene by selecting the Play arrow.
   unity_play_arrow
You should be able to view your scene and teleport with the HTC Vive


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Throwable Cube
Create a New Cube, GameObject->3D Object->Cube

Select the cube, use Add Component
     search for throw select Throwable

You can now test your scene by selecting the Play arrow. This will work without the Vive.
unity_play_arrow


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Interact with a Maya Animation

In Maya:
Model an animated poly object
Save the Maya scene file into your Unity project-> Assets


In Unity:
Add your Maya File to your scene

Select Assets in the Project tab
Drag your Maya model from the Assets list over to the Hierarchy tab.


Use Legacy to pause the animation until selected.
Select your Maya Model in the Assets area
Switch to the Rig tab in the Inspector on the right.
     Change Animation Type to Legacy  (default was Generic)
     Hit Apply
Switch to the Animation tab
Rename Take 001 to a unique name

Select the
Maya Model in the Hierarchy

     Uncheck Play Automatically in the Inspector
     (This feature does not exists in the newer software, hence legacy)



Add Interaction to the Model
Select the Maya Model in the Hierarchy
Use Add Component
     Search for inter
     Select Interactable Button Events
Hit the + under On Trigger Down () in the Inspector

Drag and drop Maya Model from the Hierarchy onto None (obj) in the Inspector
Click the drop down menu reading No function and choose Animation->CrossFade
Type Take 001 (use the new unique name) in the empty box below

steam_interact_anim


You can now test your scene by selecting the Play arrow. Your animated object will start its animation when you grab it with a trigger.
unity_play_arrow
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
OBS
OBS screen capture VR documentation



::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
**IMPORTANT Save a spare copy of your Maya scene files and Textures in another folder away from your Unity project.