Exemplo n.º 1
0
    private void updateText(Wand wand, TextMesh mesh)
    {
        mesh.text = wand.ToString() + " Info\npos: " + tracker.GetWandPosition((int)wand)
                    + "\nrot: " + tracker.GetWandRotation((int)wand);

        mesh.text += "\nmenu clicked ? " + CC_INPUT.GetButtonPress(wand, WandButton.Menu);
        mesh.text += "\ngrip clicked ? " + CC_INPUT.GetButtonPress(wand, WandButton.Grip);

        mesh.text += "\nx = " + CC_INPUT.GetAxis(wand, WandAxis.XAxis).ToString("0.00")
                     + "\ny = " + CC_INPUT.GetAxis(wand, WandAxis.YAxis).ToString("0.00")
                     + "\nclicked ? " + CC_INPUT.GetButtonPress(wand, WandButton.TrackpadClick);

        mesh.text += "\ntrigger axis = " + CC_INPUT.GetAxis(wand, WandAxis.Trigger).ToString("0.00")
                     + "\ntrigger pulled ? " + CC_INPUT.GetButtonPress(wand, WandButton.Trigger);
    }
Exemplo n.º 2
0
 void FixedUpdate()
 {
     //Set the location of the wand from the tracker information.
     transform.localPosition = scr.GetWandPosition((int)wand);
     transform.localRotation = scr.GetWandRotation((int)wand);
 }