-
Couldn't load subscription status.
- Fork 2
SDK v0.9 [Deprecated]
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:
- 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
- VRSampleScenes, contains the environment of the IntroAssignation Scene
- VRStandardAsset, contains some standard VR Assets that we use in our assignment scene
In the Scenes sub-folder, we have one scene called IntroAssignation. 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.
On the IntroAssignation Scene, you will find a GameObject called VRTracker, which contains the UNET Network Manager. You will be able to see in the inspector the following information when clicking on it. (see Unity Tutorial)
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 “_complete-game” as used in this example. This will the be the scene that is loaded after the tag assignment stage has completed.
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 each physical object that you want to be tracked, you will need to add the VR Tracker Tag script
In our case, you will need to add the script to the Player GameObject and the Gun GameObject. Don’t forget to add the camera to the player component. And on the game object that will contain the camera, add the Enable On Load script, this script will enable the player camera when the scene will be loaded.
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