using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; [CreateAssetMenu(fileName ="VRInput", menuName = "PlayerInput/VRInput")] public class VRPlayerInputReference : PlayerInputReference { public InputActionReference LeftTrigger; public InputActionReference RightTrigger; private WheelActivator _wheelActivator; private BNG.SteeringWheel _steeringWheel; public override void Init() { _wheelActivator = FindObjectOfType(); _steeringWheel = FindObjectOfType(); } public override bool Boost() { return RightTrigger.action.inProgress && LeftTrigger.action.inProgress && _wheelActivator.Active; } public override float Horizontal() { return _steeringWheel.ScaleValue; } }