protected virtual void Initialize() { trackingOffsets = GetDefaultTrackingOffsets(); loadedButtonDefs = TBInput.LoadButtonDefs <T>(GetDefaultDefs(), fileName); lookupTable = TBInput.NewLookupTableFromDefs <T>(loadedButtonDefs); loaded = true; }
/// <summary> /// Override to set up inputs for the left and right controllers in a single def on 3DOF. /// </summary> protected override void Initialize() { loadedButtonDefs = TBInput.LoadButtonDefs(GetDefaultDefs(), fileName); if (TBCore.GetActiveHeadset() == VRHeadset.GearVR) { _instance.model = VRController.GearVRController; } loadedButtonDefs.Add(new TBInput.ButtonDef <OVRInput.RawButton>() { rawButton = OVRInput.RawButton.LTouchpad, virtualButtons = loadedButtonDefs[0].virtualButtons, name = "Touchpad Left", supportsTouch = true, supportsAxis2D = true }); loadedButtonDefs.Add(new TBInput.ButtonDef <OVRInput.RawButton>() { rawButton = OVRInput.RawButton.LIndexTrigger, virtualButtons = loadedButtonDefs[1].virtualButtons, name = "Trigger Left", supportsTouch = false, supportsAxis2D = false }); lookupTable = TBInput.NewLookupTableFromDefs(loadedButtonDefs); loaded = true; }
/// <summary> /// Override to set up inputs for the left and right controllers in a single def on 3DOF. /// </summary> protected override void Initialize() { loadedButtonDefs = TBInput.LoadButtonDefs(GetDefaultDefs(), fileName); loadedButtonDefs.Add(new TBInput.ButtonDef <OVRInput.RawButton>() { rawButton = OVRInput.RawButton.LTouchpad, virtualButtons = loadedButtonDefs[0].virtualButtons, name = "Touchpad Left", supportsTouch = true, supportsAxis2D = true }); loadedButtonDefs.Add(new TBInput.ButtonDef <OVRInput.RawButton>() { rawButton = OVRInput.RawButton.LIndexTrigger, virtualButtons = loadedButtonDefs[1].virtualButtons, name = "Trigger Left", supportsTouch = false, supportsAxis2D = false }); lookupTable = TBInput.NewLookupTableFromDefs(loadedButtonDefs); loaded = true; }