protected override void Update() { //just make all buttons turn on light to prevent arguing about the best button if (Controller.GetPressDown(GripButton) || Controller.GetPressDown(TouchpadButton) || Controller.GetPressDown(TriggerButton)) { Light.SetActive(!Light.activeInHierarchy); } }
protected override void Update() { base.Update(); if (PlayerGunInterface != null) { if (Controller.GetPressDown(GripButton)) { // PlayerGunInterface.ReloadGun(); } if (Controller.GetPressDown(TriggerButton)) { PlayerGunInterface.Shoot(); SteamVR_Controller.Input((int)Controller.index).TriggerHapticPulse(HAPTIC_PULSE_DURATION); } } }