Ejemplo n.º 1
0
 private void OnDestroy()
 {
     trigger_src    = null;
     menu_src       = null;
     padClicked_src = null;
     padTouched_src = null;
     gripped_src    = null;
     controller     = null;
 }
Ejemplo n.º 2
0
        private void Awake()
        {
            controller = GetComponent <SteamVR_TrackedController>();
            trackedObj = GetComponent <SteamVR_TrackedObject>();
            Selector s = GetComponent <Selector>();

            // Wire up events
            trigger_src    = new SteamVRButtonSource(this, controller, s.GetHandler(Selector.Button.Trigger));
            menu_src       = new SteamVRButtonSource(this, controller, s.GetHandler(Selector.Button.Menu));
            padClicked_src = new SteamVRButtonSource(this, controller, s.GetHandler(Selector.Button.PadClicked));
            padTouched_src = new SteamVRButtonSource(this, controller, s.GetHandler(Selector.Button.PadTouched));
            gripped_src    = new SteamVRButtonSource(this, controller, s.GetHandler(Selector.Button.Gripped));
        }