Example #1
0
        protected override void Awake()
        {
            trackedObj = GetComponent <SteamVR_TrackedObject>();

            components = new Dictionary <ButtonId, ControllerComponent>();
            ControllerComponent c = new ControllerComponent(this);

            // Application Menu Button
            c = new ControllerComponent(this);
            components.Add(ButtonId.MENU, c);

            // Steam Home Button
            c = new ControllerComponent(this);
            components.Add(ButtonId.HOME, c);

            // Grip Button
            c = new ControllerComponent(this);
            components.Add(ButtonId.GRIP, c);

            // Trigger
            c = new ControllerComponent(this);
            components.Add(ButtonId.TRIGGER, c);

            // Touchpad
            c = new ControllerComponent(this);
            components.Add(ButtonId.THUMBPAD, c);
        }
Example #2
0
        //private OvrTouch.Hands.VelocityTracker velocityTracker;

        protected override void Awake()
        {
            InitializeController();

            components = new Dictionary <ButtonId, ControllerComponent>();
            ControllerComponent c = new ControllerComponent(this);

            // Oculus Home Button
            //c = new ControllerComponent(this);
            //components.Add(ButtonId.HOME, c);

            // Grip Trigger
            c = new ControllerComponent(this);
            components.Add(ButtonId.GRIP, c);

            // Trigger
            c = new ControllerComponent(this);
            components.Add(ButtonId.TRIGGER, c);

            // Thumb Stick
            c = new ControllerComponent(this);
            components.Add(ButtonId.THUMBPAD, c);

            // A/X Button
            c = new ControllerComponent(this);
            components.Add(ButtonId.BUTTON1, c);

            // B/Y Button
            c = new ControllerComponent(this);
            components.Add(ButtonId.BUTTON2, c);

            // Thumb Rest
            c = new ControllerComponent(this);
            components.Add(ButtonId.THUMBREST, c);
        }