diff --git a/Assets/LeanTween.meta b/Assets/LeanTween.meta new file mode 100644 index 0000000..72d6122 --- /dev/null +++ b/Assets/LeanTween.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 14d7fe06707e44d439f619e3b3b15386 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..04cdfe0 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 344646260043af4438ebc88e1102321c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Input/PlayerController.cs b/Assets/Scripts/Input/PlayerController.cs index 86b3d08..b5a2a66 100644 --- a/Assets/Scripts/Input/PlayerController.cs +++ b/Assets/Scripts/Input/PlayerController.cs @@ -22,13 +22,13 @@ public class PlayerController : MonoBehaviour public void UpdatePosition() { float HorseX, HorseZ; - HorseZ = Input.GetAxisRaw("Vertical"); - HorseX = Input.GetAxisRaw("Horizontal"); + HorseZ = receivedInput.y; + HorseX = receivedInput.x; float rotateTo = RotateObject(HorseX, HorseZ); - HorseZ = Input.GetAxis("Vertical") * Time.deltaTime * walkSpeed; - HorseX = Input.GetAxis("Horizontal") * Time.deltaTime * walkSpeed; + HorseZ *= Time.deltaTime * walkSpeed; + HorseX *= Time.deltaTime * walkSpeed; transform.Translate(HorseX, 0, HorseZ); @@ -71,7 +71,6 @@ public class PlayerController : MonoBehaviour } yield return new WaitForSeconds(0.5f); } -} // Update is called once per frame void Update()