From 09d913e14ff8fa1042ebfad4be798fb1f5bc3980 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Sat, 4 Feb 2023 15:59:14 +1100 Subject: [PATCH] working oar --- Assets/Prefab/Player.prefab | 3 + Assets/Prefab/Player.prefab.meta | 7 + Assets/Scenes/Development.meta | 8 + .../Development/CharacterControllerTest.unity | 3 + .../CharacterControllerTest.unity.meta | 7 + Assets/Scripts/Player/HandController.cs | 156 +++ Assets/Scripts/Player/HandController.cs.meta | 11 + Assets/Scripts/Player/OarController.cs | 125 +- Assets/Scripts/Player/RowController.cs | 86 ++ Assets/Scripts/Player/RowController.cs.meta | 11 + Assets/Settings/PlayerInput.inputactions | 1030 +++++++++++++++++ Assets/Settings/PlayerInput.inputactions.meta | 14 + ProjectSettings/DynamicsManager.asset | 4 +- 13 files changed, 1457 insertions(+), 8 deletions(-) create mode 100644 Assets/Prefab/Player.prefab create mode 100644 Assets/Prefab/Player.prefab.meta create mode 100644 Assets/Scenes/Development.meta create mode 100644 Assets/Scenes/Development/CharacterControllerTest.unity create mode 100644 Assets/Scenes/Development/CharacterControllerTest.unity.meta create mode 100644 Assets/Scripts/Player/HandController.cs create mode 100644 Assets/Scripts/Player/HandController.cs.meta create mode 100644 Assets/Scripts/Player/RowController.cs create mode 100644 Assets/Scripts/Player/RowController.cs.meta create mode 100644 Assets/Settings/PlayerInput.inputactions create mode 100644 Assets/Settings/PlayerInput.inputactions.meta diff --git a/Assets/Prefab/Player.prefab b/Assets/Prefab/Player.prefab new file mode 100644 index 0000000..2f1c41d --- /dev/null +++ b/Assets/Prefab/Player.prefab @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e188a9bf91bce350d5779b030c85071df864839000f074cd65c5502c8afefc13 +size 21839 diff --git a/Assets/Prefab/Player.prefab.meta b/Assets/Prefab/Player.prefab.meta new file mode 100644 index 0000000..0976ec9 --- /dev/null +++ b/Assets/Prefab/Player.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 72514749158858a4e8977db04e36b05a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Development.meta b/Assets/Scenes/Development.meta new file mode 100644 index 0000000..3204b54 --- /dev/null +++ b/Assets/Scenes/Development.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1b8532fcb1449a640a09b4cdf120171e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Development/CharacterControllerTest.unity b/Assets/Scenes/Development/CharacterControllerTest.unity new file mode 100644 index 0000000..e027715 --- /dev/null +++ b/Assets/Scenes/Development/CharacterControllerTest.unity @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3bc2d1abea8dfa233734dc9da271423c8ef68087f4aac8b2952baee7b8ba5ff +size 17564 diff --git a/Assets/Scenes/Development/CharacterControllerTest.unity.meta b/Assets/Scenes/Development/CharacterControllerTest.unity.meta new file mode 100644 index 0000000..6612f20 --- /dev/null +++ b/Assets/Scenes/Development/CharacterControllerTest.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 08c61a126f535e24592d442f7d72b045 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Player/HandController.cs b/Assets/Scripts/Player/HandController.cs new file mode 100644 index 0000000..379ce18 --- /dev/null +++ b/Assets/Scripts/Player/HandController.cs @@ -0,0 +1,156 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.InputSystem; +using NaughtyAttributes; + + +/// +/// +/// +public class HandController : MonoBehaviour +{ + + #region Inspector Fields + + [SerializeField, BoxGroup("References")] + private Transform m_handTransform; + + [SerializeField] + private Transform m_otherHand; + + [SerializeField, BoxGroup("Settings")] + private Vector3 m_axisNormal = Vector3.forward; + [SerializeField, BoxGroup("Settings")] + private Vector3 m_axisForward = Vector3.up; + + [SerializeField, BoxGroup("Settings")] + private float m_armRange = 1; + + [SerializeField, BoxGroup("Settings"),Range(0.0f,1.0f)] + private float m_armSpeed = 0.5f; + + [SerializeField, BoxGroup("Input")] + private InputActionProperty m_inputAxis; + + [SerializeField, BoxGroup("Input")] + private InputActionProperty m_row; + + + + #endregion Inspector Fields + + #region Private Fields + + //Last input of player + private Vector2 m_desiredInput; + private Vector3 m_startPosition; + private Vector3 m_lastPosition; + + #endregion Private Fields + + #region Getters + public new Transform transform => m_handTransform; + #endregion Getters + + + + #region MonoBehaviour Functions + + private void Start() + { + m_startPosition = transform.localPosition; + } + + /// + /// OnEnable is called when the object becomes enabled and active. + /// + private void OnEnable() + { + m_inputAxis.action.performed += OnInputRecieved; + m_inputAxis.action.canceled += OnInputRecieved; + m_inputAxis.action.Enable(); + m_row.action?.Enable(); + } + + /// + /// OnDisable is called when the behaviour becomes disabled. + /// + private void OnDisable() + { + m_inputAxis.action.performed -= OnInputRecieved; + m_inputAxis.action.canceled -= OnInputRecieved; + m_inputAxis.action.Disable(); + m_row.action?.Disable(); + } + + /// + /// Update is called once per frame + /// + private void FixedUpdate() + { + UpdateHand(m_desiredInput); + } + + #endregion MonoBehaviour Functions + + #region Class Functionality + + /// + /// Called every fixed update to move the arms + /// + /// + private void UpdateHand(Vector2 input) + { + + m_lastPosition = transform.localPosition; + + Quaternion rotation = Quaternion.LookRotation(m_axisForward.normalized, m_axisNormal.normalized); + Vector3 axisInput = transform.rotation * rotation * new Vector3(input.x, 0, input.y); + + + Vector3 desiredPosition = m_startPosition + axisInput * m_armRange; + transform.localPosition = Vector3.Lerp(transform.localPosition, desiredPosition, m_armSpeed); + + if (m_row.action != null) + { + if (m_row.action.IsPressed()) + { + transform.localPosition = Vector3.Lerp(transform.localPosition, m_otherHand.localPosition, 0.5f); + } + } + + + + } + + public void UndoLastMovement() + { + transform.localPosition = m_lastPosition; + } + + + /// + /// Called by the input system when the input is changed + /// + /// + private void OnInputRecieved(InputAction.CallbackContext args) + { + + m_desiredInput = args.ReadValue(); + } + + + #endregion Class Functionality + + #region Editor Functions + /// + /// Called when the Component is created or Reset from the Inspector + /// + private void Reset() + { + m_handTransform = base.transform; + } + #endregion Editor Functions + +} \ No newline at end of file diff --git a/Assets/Scripts/Player/HandController.cs.meta b/Assets/Scripts/Player/HandController.cs.meta new file mode 100644 index 0000000..afce485 --- /dev/null +++ b/Assets/Scripts/Player/HandController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9531ea25ab68fa6428196676e0198eb6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Player/OarController.cs b/Assets/Scripts/Player/OarController.cs index adb3a7b..9a88996 100644 --- a/Assets/Scripts/Player/OarController.cs +++ b/Assets/Scripts/Player/OarController.cs @@ -1,18 +1,131 @@ using System.Collections; using System.Collections.Generic; +using System.Linq; using UnityEngine; +using NaughtyAttributes; + +/// +/// Script to control player input and oars +/// public class OarController : MonoBehaviour { - // Start is called before the first frame update - void Start() + + #region Inspector Fields + + [SerializeField,BoxGroup("References")] + private HandController m_leftHand; + + [SerializeField, BoxGroup("References")] + private HandController m_rightHand; + + [SerializeField, BoxGroup("References")] + private Rigidbody m_oarRigidbody; + + [SerializeField, BoxGroup("References")] + private Transform m_body; + + [SerializeField] + private List m_forbiddenColliders; + + #endregion Inspector Fields + + #region Private Fields + + float m_distanceFromRightHand; + bool undoDoneThisFrame = false; + + #endregion Private Fields + + #region Getters + + public new Transform transform => m_oarRigidbody.transform; + + + #endregion Getters + + + + #region MonoBehaviour Functions + + private void Awake() { - + m_distanceFromRightHand = Vector3.Distance(m_rightHand.transform.position, transform.position); + m_oarRigidbody = GetComponent(); + } + + /// + /// OnEnable is called when the object becomes enabled and active. + /// + private void OnEnable() + { + } - // Update is called once per frame - void Update() + /// + /// OnDisable is called when the behaviour becomes disabled. + /// + private void OnDisable() + { + + } + + /// + /// Update is called once per frame + /// + private void FixedUpdate() + { + undoDoneThisFrame = false; + UpdateTransform(); + } + + #endregion MonoBehaviour Functions + + #region Class Functionality + + private void UpdateTransform() + { + + Vector3 direction =(m_rightHand.transform.position - m_leftHand.transform.position).normalized; + Vector3 forward = Vector3.Cross(direction, m_body.forward); + Quaternion rotation = Quaternion.LookRotation(forward, direction); + + m_oarRigidbody.MovePosition(m_rightHand.transform.position - direction * m_distanceFromRightHand); + m_oarRigidbody.MoveRotation(rotation); + + + } + + + void OnCollisionEnter(Collision collision) { + if (m_forbiddenColliders.Contains(collision.collider) && !undoDoneThisFrame) + { + Debug.Log($"Forbidden Collision: {collision.collider.gameObject}"); + undoDoneThisFrame= true; + m_leftHand.UndoLastMovement(); + m_rightHand.UndoLastMovement(); + } + else + { + Debug.Log($"Ignored Collision: {collision.collider.gameObject}"); + } + + + } -} + + #endregion Class Functionality + + #region Editor Functions + /// + /// Called when the Component is created or Reset from the Inspector + /// + private void Reset() + { + m_oarRigidbody = GetComponentInChildren(); + } + #endregion Editor Functions + +} \ No newline at end of file diff --git a/Assets/Scripts/Player/RowController.cs b/Assets/Scripts/Player/RowController.cs new file mode 100644 index 0000000..245567f --- /dev/null +++ b/Assets/Scripts/Player/RowController.cs @@ -0,0 +1,86 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.InputSystem; +using NaughtyAttributes; + + +/// +/// +/// +public class RowController : MonoBehaviour +{ + + #region Inspector Fields + + [SerializeField] + private Transform m_topHand; + [SerializeField] + private Transform m_bottomHand; + + [SerializeField, BoxGroup("Settings"), Range(0.0f, 1.0f)] + private float m_armRange = 1; + + [SerializeField, BoxGroup("Settings"), Range(0.0f, 1.0f)] + private float m_armSpeed = 0.2f; + + [SerializeField, BoxGroup("Input")] + private InputActionProperty m_inputAxis; + #endregion Inspector Fields + + #region Private Fields + + #endregion Private Fields + + #region Getters + + #endregion Getters + + + + #region MonoBehaviour Functions + + + + + /// + /// OnEnable is called when the object becomes enabled and active. + /// + private void OnEnable() + { + + } + + /// + /// OnDisable is called when the behaviour becomes disabled. + /// + private void OnDisable() + { + + } + + /// + /// Update is called once per frame + /// + private void Update() + { + + } + + #endregion MonoBehaviour Functions + + #region Class Functionality + + #endregion Class Functionality + + #region Editor Functions + /// + /// Called when the Component is created or Reset from the Inspector + /// + private void Reset() + { + //useful for finding components on creation + } + #endregion Editor Functions + +} \ No newline at end of file diff --git a/Assets/Scripts/Player/RowController.cs.meta b/Assets/Scripts/Player/RowController.cs.meta new file mode 100644 index 0000000..edde4e0 --- /dev/null +++ b/Assets/Scripts/Player/RowController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8c0b8a0d937577428fa6056801a716a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/PlayerInput.inputactions b/Assets/Settings/PlayerInput.inputactions new file mode 100644 index 0000000..1633632 --- /dev/null +++ b/Assets/Settings/PlayerInput.inputactions @@ -0,0 +1,1030 @@ +{ + "name": "PlayerInput", + "maps": [ + { + "name": "Player", + "id": "df70fa95-8a34-4494-b137-73ab6b9c7d37", + "actions": [ + { + "name": "Move", + "type": "Value", + "id": "351f2ccd-1f9f-44bf-9bec-d62ac5c5f408", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Look", + "type": "Value", + "id": "6b444451-8a00-4d00-a97e-f47457f736a8", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Fire", + "type": "Button", + "id": "6c2ab1b8-8984-453a-af3d-a3c78ae1679a", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "LeftHand", + "type": "Value", + "id": "f6cfb44c-f6bc-43dd-8a14-c8fd46d8b5ae", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "RightHand", + "type": "Value", + "id": "a4b5a635-a9e0-423a-acb3-9a5d06d7695f", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Row", + "type": "Button", + "id": "bab9bf2a-8991-4a16-a9a2-c34fe8614ab2", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "", + "id": "978bfe49-cc26-4a3d-ab7b-7d7a29327403", + "path": "/leftStick", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "WASD", + "id": "00ca640b-d935-4593-8157-c05846ea39b3", + "path": "Dpad", + "interactions": "", + "processors": "", + "groups": "", + "action": "Move", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "e2062cb9-1b15-46a2-838c-2f8d72a0bdd9", + "path": "/w", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "8180e8bd-4097-4f4e-ab88-4523101a6ce9", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "320bffee-a40b-4347-ac70-c210eb8bc73a", + "path": "/s", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "1c5327b5-f71c-4f60-99c7-4e737386f1d1", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc", + "path": "/a", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "2e46982e-44cc-431b-9f0b-c11910bf467a", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400", + "path": "/d", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "77bff152-3580-4b21-b6de-dcd0c7e41164", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8", + "path": "/{Primary2DAxis}", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "3ea4d645-4504-4529-b061-ab81934c3752", + "path": "/stick", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "c1f7a91b-d0fd-4a62-997e-7fb9b69bf235", + "path": "/rightStick", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Look", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8c8e490b-c610-4785-884f-f04217b23ca4", + "path": "/delta", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse;Touch", + "action": "Look", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "3e5f5442-8668-4b27-a940-df99bad7e831", + "path": "/{Hatswitch}", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Look", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91", + "path": "/rightTrigger", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "05f6913d-c316-48b2-a6bb-e225f14c7960", + "path": "/leftButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "886e731e-7071-4ae4-95c0-e61739dad6fd", + "path": "/primaryTouch/tap", + "interactions": "", + "processors": "", + "groups": ";Touch", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54", + "path": "/trigger", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8255d333-5683-4943-a58a-ccb207ff1dce", + "path": "/{PrimaryAction}", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "10001f63-63d0-4b8e-b30a-c5c2fdd1141f", + "path": "/leftStick", + "interactions": "", + "processors": "", + "groups": "", + "action": "LeftHand", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "WASD", + "id": "f6c53763-cc3d-4b21-84f9-602e6b1f4670", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "LeftHand", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "d53b8c44-d967-4187-8a4c-6963ea596cff", + "path": "/w", + "interactions": "", + "processors": "", + "groups": "", + "action": "LeftHand", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "736b095d-e648-404d-b0f5-a5d6236a4b96", + "path": "/s", + "interactions": "", + "processors": "", + "groups": "", + "action": "LeftHand", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "43153739-4f10-4130-bd34-4dc5fc5bb7d1", + "path": "/a", + "interactions": "", + "processors": "", + "groups": "", + "action": "LeftHand", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "cef898a2-b5ee-41d3-b185-893c3ae86225", + "path": "/d", + "interactions": "", + "processors": "", + "groups": "", + "action": "LeftHand", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "84789845-d0bc-4668-8ad3-8587dc89a28a", + "path": "/rightStick", + "interactions": "", + "processors": "", + "groups": "", + "action": "RightHand", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "ArrowKeys", + "id": "067853e7-5077-421f-9bea-fc03f25bc81a", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "RightHand", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "fbe4fcff-b6cf-4af9-b7de-061bb198b57c", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": "", + "action": "RightHand", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "4045a41e-2340-49db-bcb6-0c791af02b9c", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": "", + "action": "RightHand", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "669c30cc-0f52-4ade-baa7-e6a65416f090", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": "", + "action": "RightHand", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "4ca5482a-57cf-4153-90b7-80fd9911a290", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": "", + "action": "RightHand", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "6009b550-8e91-447e-b630-8933c8bd3991", + "path": "/buttonSouth", + "interactions": "", + "processors": "", + "groups": "", + "action": "Row", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "50946bf3-61bf-4f2c-9cb5-5458282eb46e", + "path": "/space", + "interactions": "", + "processors": "", + "groups": "", + "action": "Row", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "0da292da-ec77-42c6-8da3-8878664a7745", + "path": "/rightTrigger", + "interactions": "", + "processors": "", + "groups": "", + "action": "Row", + "isComposite": false, + "isPartOfComposite": false + } + ] + }, + { + "name": "UI", + "id": "272f6d14-89ba-496f-b7ff-215263d3219f", + "actions": [ + { + "name": "Navigate", + "type": "PassThrough", + "id": "c95b2375-e6d9-4b88-9c4c-c5e76515df4b", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Submit", + "type": "Button", + "id": "7607c7b6-cd76-4816-beef-bd0341cfe950", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Cancel", + "type": "Button", + "id": "15cef263-9014-4fd5-94d9-4e4a6234a6ef", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Point", + "type": "PassThrough", + "id": "32b35790-4ed0-4e9a-aa41-69ac6d629449", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Click", + "type": "PassThrough", + "id": "3c7022bf-7922-4f7c-a998-c437916075ad", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "ScrollWheel", + "type": "PassThrough", + "id": "0489e84a-4833-4c40-bfae-cea84b696689", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "MiddleClick", + "type": "PassThrough", + "id": "dad70c86-b58c-4b17-88ad-f5e53adf419e", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "RightClick", + "type": "PassThrough", + "id": "44b200b1-1557-4083-816c-b22cbdf77ddf", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "TrackedDevicePosition", + "type": "PassThrough", + "id": "24908448-c609-4bc3-a128-ea258674378a", + "expectedControlType": "Vector3", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "TrackedDeviceOrientation", + "type": "PassThrough", + "id": "9caa3d8a-6b2f-4e8e-8bad-6ede561bd9be", + "expectedControlType": "Quaternion", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "Gamepad", + "id": "809f371f-c5e2-4e7a-83a1-d867598f40dd", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "Navigate", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "14a5d6e8-4aaf-4119-a9ef-34b8c2c548bf", + "path": "/leftStick/up", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "9144cbe6-05e1-4687-a6d7-24f99d23dd81", + "path": "/rightStick/up", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "2db08d65-c5fb-421b-983f-c71163608d67", + "path": "/leftStick/down", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "58748904-2ea9-4a80-8579-b500e6a76df8", + "path": "/rightStick/down", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "8ba04515-75aa-45de-966d-393d9bbd1c14", + "path": "/leftStick/left", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "712e721c-bdfb-4b23-a86c-a0d9fcfea921", + "path": "/rightStick/left", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "fcd248ae-a788-4676-a12e-f4d81205600b", + "path": "/leftStick/right", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "1f04d9bc-c50b-41a1-bfcc-afb75475ec20", + "path": "/rightStick/right", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "fb8277d4-c5cd-4663-9dc7-ee3f0b506d90", + "path": "/dpad", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "Joystick", + "id": "e25d9774-381c-4a61-b47c-7b6b299ad9f9", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "Navigate", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "3db53b26-6601-41be-9887-63ac74e79d19", + "path": "/stick/up", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "0cb3e13e-3d90-4178-8ae6-d9c5501d653f", + "path": "/stick/down", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "0392d399-f6dd-4c82-8062-c1e9c0d34835", + "path": "/stick/left", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "942a66d9-d42f-43d6-8d70-ecb4ba5363bc", + "path": "/stick/right", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "Keyboard", + "id": "ff527021-f211-4c02-933e-5976594c46ed", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "Navigate", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "563fbfdd-0f09-408d-aa75-8642c4f08ef0", + "path": "/w", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "eb480147-c587-4a33-85ed-eb0ab9942c43", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "2bf42165-60bc-42ca-8072-8c13ab40239b", + "path": "/s", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "85d264ad-e0a0-4565-b7ff-1a37edde51ac", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "74214943-c580-44e4-98eb-ad7eebe17902", + "path": "/a", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "cea9b045-a000-445b-95b8-0c171af70a3b", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "8607c725-d935-4808-84b1-8354e29bab63", + "path": "/d", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "4cda81dc-9edd-4e03-9d7c-a71a14345d0b", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "9e92bb26-7e3b-4ec4-b06b-3c8f8e498ddc", + "path": "*/{Submit}", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR", + "action": "Submit", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "82627dcc-3b13-4ba9-841d-e4b746d6553e", + "path": "*/{Cancel}", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR", + "action": "Cancel", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "c52c8e0b-8179-41d3-b8a1-d149033bbe86", + "path": "/position", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Point", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "e1394cbc-336e-44ce-9ea8-6007ed6193f7", + "path": "/position", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Point", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "5693e57a-238a-46ed-b5ae-e64e6e574302", + "path": "/touch*/position", + "interactions": "", + "processors": "", + "groups": "Touch", + "action": "Point", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "4faf7dc9-b979-4210-aa8c-e808e1ef89f5", + "path": "/leftButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8d66d5ba-88d7-48e6-b1cd-198bbfef7ace", + "path": "/tip", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "47c2a644-3ebc-4dae-a106-589b7ca75b59", + "path": "/touch*/press", + "interactions": "", + "processors": "", + "groups": "Touch", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "bb9e6b34-44bf-4381-ac63-5aa15d19f677", + "path": "/trigger", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "38c99815-14ea-4617-8627-164d27641299", + "path": "/scroll", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "ScrollWheel", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "24066f69-da47-44f3-a07e-0015fb02eb2e", + "path": "/middleButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "MiddleClick", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "4c191405-5738-4d4b-a523-c6a301dbf754", + "path": "/rightButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "RightClick", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "7236c0d9-6ca3-47cf-a6ee-a97f5b59ea77", + "path": "/devicePosition", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "TrackedDevicePosition", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "23e01e3a-f935-4948-8d8b-9bcac77714fb", + "path": "/deviceRotation", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "TrackedDeviceOrientation", + "isComposite": false, + "isPartOfComposite": false + } + ] + } + ], + "controlSchemes": [ + { + "name": "Keyboard&Mouse", + "bindingGroup": "Keyboard&Mouse", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + }, + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Gamepad", + "bindingGroup": "Gamepad", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Touch", + "bindingGroup": "Touch", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Joystick", + "bindingGroup": "Joystick", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "XR", + "bindingGroup": "XR", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + } + ] +} \ No newline at end of file diff --git a/Assets/Settings/PlayerInput.inputactions.meta b/Assets/Settings/PlayerInput.inputactions.meta new file mode 100644 index 0000000..01efed7 --- /dev/null +++ b/Assets/Settings/PlayerInput.inputactions.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: 5007e9a2e21d73f43b8fbe101756449d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3} + generateWrapperCode: 0 + wrapperCodePath: + wrapperClassName: + wrapperCodeNamespace: UnityEngine.InputSystem diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset index 41cbfd2..4e96d0e 100644 --- a/ProjectSettings/DynamicsManager.asset +++ b/ProjectSettings/DynamicsManager.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ac4c1fbcfd242aef00c7fe80948376762a41de9d185540d13e25a8a28812452 -size 1254 +oid sha256:72854f0c15a6f6d760a54b340adf092d405b8c1fb0c6708a972a3a0085d8cb74 +size 1323