Jump to content

Recommended Posts

Posted

Hello, I am trying to create a game in Unity that involves the use of Vive trackers.

However, we cannot let others run the Unity project and can only give them a build/executable of the game.

There are 3 Vive trackers needed (1 for hip and 2 for feet).

Is there a way to have a popup at the start of game that forces users to turn on Vive trackers and assign them to certain game objects in the scene?

Thank you!

@chengnay

Posted

@clk1999 Are you using Vive Input Utility(VIU) for your development?

For the popup part, you can check whether the trackers are connected or not.

For example,

var deviceState = VRModule.GetCurrentDeviceState(ViveRole.GetDeviceIndexEx(TrackerRole.Tracker1));

Debug.Log("Is Tracker1 connected? " + deviceState.isConnected);

 

Next, you could use "BindDeviceToRole" api for assigning them to certain game objects.

1. Making your game objects to certain role

2. When you detected trackers are connected

3. Assign them to the role that you have assigned for those game objects

 

All above code could be found in VIU.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...