/// <summary>
    /// Add the Destiny ClusterInput settings for OptiTrack for the correct syncing through all clients and masters.
    /// This uses VRPN servers that are launched on Kanaloa 1.
    /// </summary>
    private static void addOptiTrackClusterInputs()
    {
        //Head entry added
        ClusterInput.AddInput("head", "CC_FLAT_HEAD", CC_CONFIG.trackerIP, 0, ClusterInputType.Tracker);
        //Wand entries added
        ClusterInput.AddInput("leftWand", "CC_FLAT_WAND0", CC_CONFIG.trackerIP, 0, ClusterInputType.Tracker);
        ClusterInput.AddInput("rightWand", "CC_FLAT_WAND1", CC_CONFIG.trackerIP, 0, ClusterInputType.Tracker);

        //Left axis entries added
        ClusterInput.AddInput("leftXAxis", "XInput0", CC_CONFIG.controllerIP, 0, ClusterInputType.Axis);
        ClusterInput.AddInput("leftYAxis", "XInput0", CC_CONFIG.controllerIP, 1, ClusterInputType.Axis);
        ClusterInput.AddInput("leftTriggerAxis", "XInput0", CC_CONFIG.controllerIP, 5, ClusterInputType.Axis);
        ClusterInput.AddInput("leftDpad", "XInput0", CC_CONFIG.controllerIP, 4, ClusterInputType.Axis);
        //Left button entries added
        ClusterInput.AddInput("leftX", "XInput0", CC_CONFIG.controllerIP, 0, ClusterInputType.Button);
        ClusterInput.AddInput("leftO", "XInput0", CC_CONFIG.controllerIP, 1, ClusterInputType.Button);
        ClusterInput.AddInput("leftShoulder", "XInput0", CC_CONFIG.controllerIP, 4, ClusterInputType.Button);

        //Right axis entries added
        ClusterInput.AddInput("rightXAxis", "XInput1", CC_CONFIG.controllerIP, 0, ClusterInputType.Axis);
        ClusterInput.AddInput("rightYAxis", "XInput1", CC_CONFIG.controllerIP, 1, ClusterInputType.Axis);
        ClusterInput.AddInput("rightTriggerAxis", "XInput1", CC_CONFIG.controllerIP, 5, ClusterInputType.Axis);
        ClusterInput.AddInput("rightDpad", "XInput1", CC_CONFIG.controllerIP, 4, ClusterInputType.Axis);
        //Right button entries added
        ClusterInput.AddInput("rightX", "XInput1", CC_CONFIG.controllerIP, 0, ClusterInputType.Button);
        ClusterInput.AddInput("rightO", "XInput1", CC_CONFIG.controllerIP, 1, ClusterInputType.Button);
        ClusterInput.AddInput("rightShoulder", "XInput1", CC_CONFIG.controllerIP, 4, ClusterInputType.Button);
    }
    /// <summary>
    /// Add the Destiny ClusterInput settings for Vive for the correct syncing through all clients and masters.
    /// This uses VRPN servers that are launched on Kanaloa 1.
    /// </summary>
    private static void addViveClusterInputs()
    {
        //Head and wand ClusterInput entries added
        ClusterInput.AddInput("head", "CC_FLAT_HEAD", CC_CONFIG.serverIP, 0, ClusterInputType.Tracker);
        ClusterInput.AddInput("leftWand", "CC_FLAT_WAND0", CC_CONFIG.serverIP, 0, ClusterInputType.Tracker);
        ClusterInput.AddInput("rightWand", "CC_FLAT_WAND1", CC_CONFIG.serverIP, 0, ClusterInputType.Tracker);

        //Left wand axis ClusterInput entries added
        ClusterInput.AddInput("leftXAxis", "CC_FLAT_WAND0", CC_CONFIG.serverIP, 0, ClusterInputType.CustomProvidedInput);
        ClusterInput.AddInput("leftYAxis", "CC_FLAT_WAND0", CC_CONFIG.serverIP, 1, ClusterInputType.CustomProvidedInput);
        ClusterInput.AddInput("leftTriggerAxis", "CC_FLAT_WAND0", CC_CONFIG.serverIP, 2, ClusterInputType.CustomProvidedInput);

        //Left wand button ClusterInput entries added
        ClusterInput.AddInput("leftMenu", "CC_FLAT_WAND0", CC_CONFIG.serverIP, 1, ClusterInputType.Button);
        ClusterInput.AddInput("leftGrip", "CC_FLAT_WAND0", CC_CONFIG.serverIP, 2, ClusterInputType.Button);
        ClusterInput.AddInput("leftTrackpad", "CC_FLAT_WAND0", CC_CONFIG.serverIP, 32, ClusterInputType.CustomProvidedInput);
        ClusterInput.AddInput("leftTrigger", "CC_FLAT_WAND0", CC_CONFIG.serverIP, 33, ClusterInputType.CustomProvidedInput);

        //Right wand axis ClusterInput entries added
        ClusterInput.AddInput("rightXAxis", "CC_FLAT_WAND1", CC_CONFIG.serverIP, 0, ClusterInputType.CustomProvidedInput);
        ClusterInput.AddInput("rightYAxis", "CC_FLAT_WAND1", CC_CONFIG.serverIP, 1, ClusterInputType.CustomProvidedInput);
        ClusterInput.AddInput("rightTriggerAxis", "CC_FLAT_WAND1", CC_CONFIG.serverIP, 2, ClusterInputType.CustomProvidedInput);

        //Right wand button ClusterInput entries added
        ClusterInput.AddInput("rightMenu", "CC_FLAT_WAND1", CC_CONFIG.serverIP, 1, ClusterInputType.Button);
        ClusterInput.AddInput("rightGrip", "CC_FLAT_WAND1", CC_CONFIG.serverIP, 2, ClusterInputType.Button);
        ClusterInput.AddInput("rightTrackpad", "CC_FLAT_WAND1", CC_CONFIG.serverIP, 32, ClusterInputType.CustomProvidedInput);
        ClusterInput.AddInput("rightTrigger", "CC_FLAT_WAND1", CC_CONFIG.serverIP, 33, ClusterInputType.CustomProvidedInput);
    }
 // Use this for initialization
 void Start()
 {
     ClusterInput.AddInput("MouseTestX", "testDevice1", "10.0.1.28", 0, ClusterInputType.CustomProvidedInput);
     ClusterInput.AddInput("MouseTestY", "testDevice2", "10.0.1.28", 0, ClusterInputType.CustomProvidedInput);
     if (ClusterNetwork.IsMasterOfCluster())
     {
         Debug.Log("I am the cluster master");
     }
     else
     {
         Debug.Log("I am the cluster slave");
     }
 }
 public icClusterInput(string s)
 {
     this.inputName = s;
     ClusterInput.AddInput(this.inputName, this.inputName, icClusterInput.masterIP, 0, ClusterInputType.CustomProvidedInput);
 }
Example #5
0
 /// <summary>
 /// Configure the VRPN device with the Unity ClusterInput service.
 /// </summary>
 public override void Configure()
 {
     /// Addes the VRPN device to the Unity Cluster Input class.
     ClusterInput.AddInput(id.ToString(), Device, Server, Index, InputType);
 }