-
Couldn't load subscription status.
- Fork 2
SDK v1.0
Edited date : 16/03/2018, an update will come for next week, some small changes will occur
You have two choices to get the VR Tracker Plugin, download the files or use the VR Tracker Package. The VR Tracker folder contains the different sub-folders:
- Animations, containing the Arrow Animation
- Audio
- Environment, containing the environment used in the IntroAssignment Scene
- Font
- Logo, containing some of our logo, if by any chance, you want to use them ;)
- Materials
- Models
- Plugins, contains the websocket library
- Prefabs, contains some example prefabs
- Scenes, you will have the assignment scene that will help you associate the tags to a user
- Scripts, contains the different scripts that we provide to handle the communication with our system
- Shaders, containing the shader use for the boundaries
- Textures
In the Scenes sub-folder, we have one scene called IntroAssignment. This contains the tag association routine and is one that needs to be used first before any other scene.
As your tracking tags are not assigned only the “Re-assign my Tags” option is displayed. By either using the mouse or if running a VR scene, look, at the “Re-assign my tags” and follow the routine. (Currently the Start Game option has the same behavior as "Re-assign my Tags, will be corrected in the next update)
On the IntroAssignment Scene, you will find a GameObject called VRTracker, which contains the VR Tracker NEtwork Manager, which extend the UNET Network Manager. You will be able to see in the inspector the following information when clicking on it. (see Unity Tutorial)
You will find 3 different scripts on this Game Object:
- VR Tracker, which handles the communication with the VR Tracker system
- VR Tracker Tag assignment, which handles the auto assignment of the tags, and help you skip the intro scene
- VR Tracker Network, which will handle the networking based on UNET
After adding you own scene in the Build Settings, add it as the Online Scene in the Network Manager of the VRTracker GameObject, replacing the sample name of “Test” as used in this example. This will the be the scene that is loaded after the tag assignment stage has completed.
For each tag you want to assign to a user, you will need a corresponding VR Tracker Tag Script:
- To hold this script, create a child Object for each script on the VR Tracker Tag Object, that will help you retrieve the easily the information across different scene.
- Choose the Tag Type, this is important to choose it accordingly to the purpose of this tag. You can add your own type if needed on the VR Tracker Script (enum TagType)
- If you have a Tag version 1, you will need to activated the orientation, check *Orientation Enabled" if you want to retrieve the orientation information from the tag.
Inside the Prefabs folder is an example prefab so that you can see what the different important elements are when using UNET. (Unity Player Prefab)
You can see the different sections here that are important for Unity3D’s UNET.
You can directly use this prefab to test it with your own scene or create your own player prefab. For that take your player and add on it the following components:
- A Network Identity, for a player, the Local Player Authority should be checked
- Network Transform, that will help network the player position across the network
- A Network Transform Child, if you use 2 tags or more, you will need one for each gameObject that will be moved with the tag
For the child object, you will need:
- For each object that you want to be tracked, you will need to add the VR Tracker Follow Tag script. In our case, you will need to add the script to the Player GameObject and the Controller GameObject. You will have to choose, which corresponding tag it will update from, in the case of the camera, choose the Head TagType. You can also choose, which coordinate you want to update.
- The Enable On Load script, this script will enable the player camera when the scene will be loaded.
- The VR Tracker Headset Rotation, This is only for the Tags V2, this will correct the rotation offset that you will have when you start the game, enabling all the player to have the same absolute orientation.
On the Spawn Info, select the player prefab that you have created as the Player Prefab. It will generate the different player avatar based on this prefab when connected.
Now you can try the game with the new user prefab that you’ve created 😊.
You should now be good to go to use our system with this version of the plugin, enjoy!
Getting Started