diff --git a/Assets/ControllerMapper.asset b/Assets/ControllerMapper.asset index e3d0d54..23af3fe 100644 --- a/Assets/ControllerMapper.asset +++ b/Assets/ControllerMapper.asset @@ -17,9 +17,6 @@ MonoBehaviour: - name: Jump XboxButtons: 00000000 KeyboardKeys: - - name: Throw - XboxButtons: 01000000 - KeyboardKeys: - name: Sleep XboxButtons: 02000000 KeyboardKeys: @@ -48,6 +45,9 @@ MonoBehaviour: - name: LookBackward Axis: 07000000 KeyboardKeys: + - name: Throw + Axis: 09000000 + KeyboardKeys: ButtonStates: [] - name: Sleeping ButtonActions: diff --git a/Assets/Scripts/ChildController.cs b/Assets/Scripts/ChildController.cs index bde9551..324ff84 100644 --- a/Assets/Scripts/ChildController.cs +++ b/Assets/Scripts/ChildController.cs @@ -88,6 +88,10 @@ public class ChildController : MonoBehaviour Mathf.Atan2(xLookingValue, zLookingValue) * Mathf.Rad2Deg -90, // -90 to correct forward facing angle... transform.eulerAngles.z); } + } + + if (input.Ranges.ContainsKey("Throw")) { + _child.Throw(); } } @@ -111,10 +115,6 @@ public class ChildController : MonoBehaviour _child.WakeUp(); InputManager.Instance.PushActiveContext("Awake", (int)PlayerNumber); } - - if (input.Actions.Contains("Throw")) { - _child.Throw(); - } } }