From fe0ac70b489d53118f8d53ce16a3243005e77c9d Mon Sep 17 00:00:00 2001 From: Gregory Campbell Date: Sun, 12 Jan 2020 18:26:38 -0500 Subject: [PATCH] Switched from ps4 functionality to xbox one functionality --- Assets/Scripts/PlayerController.cs | 10 +++---- ProjectSettings/InputManager.asset | 44 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index 41384c1..abc14d5 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -146,14 +146,14 @@ public class PlayerController : MonoBehaviour } } - if(Input.GetButton("Crouch")) + if(Input.GetButton("Crouch") || Input.GetAxis("Crouch") == 1.0f) { characterController.height /= 2; capsule.height /= 2; transform.localScale = new Vector3(transform.localScale.x, transformHeight/2, transform.localScale.z); - if(Input.GetButtonDown("Crouch")) + if(Input.GetButtonDown("Crouch") || Input.GetAxis("Crouch") == 1.0f) { if((Input.GetAxis("Horizontal") != 0 || Input.GetAxis("Vertical") != 0)) { @@ -197,7 +197,7 @@ public class PlayerController : MonoBehaviour } else { slideTime = Time.time; - if(Input.GetButton("Crouch")) + if(Input.GetButton("Crouch") || Input.GetAxis("Crouch") == 1.0f) { characterController.height /= 2; @@ -214,7 +214,7 @@ public class PlayerController : MonoBehaviour } //Might want to change move direction value to make triggering this speed up effect easier/harder - if(diving && moveDirection.y > 0.75 && Input.GetButtonDown("Crouch")) + if(diving && moveDirection.y > 0.75 && (Input.GetButtonDown("Crouch") || Input.GetAxis("Crouch") == 1.0f )) { dive++; if(dive == 1){ @@ -268,7 +268,7 @@ public class PlayerController : MonoBehaviour velocity.x += moveDirection.x; velocity.z += moveDirection.z; - if((Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0) || Input.GetButton("Stop")){ + if((Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0) || (Input.GetButton("Stop") || Input.GetAxis("Stop") == 1.0f)){ //Remove or "lower" friction to add an 'ice' effect velocity.x = Mathf.SmoothDamp(velocity.x, 0.0f, ref xVelocity, friction); diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index 362ea6c..ebc16eb 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -186,16 +186,16 @@ InputManager: descriptiveName: descriptiveNegativeName: negativeButton: - positiveButton: joystick button 7 + positiveButton: altNegativeButton: altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 1 invert: 0 - type: 0 - axis: 0 + type: 2 + axis: 9 joyNum: 0 - serializedVersion: 3 m_Name: Walk @@ -218,23 +218,23 @@ InputManager: descriptiveName: descriptiveNegativeName: negativeButton: - positiveButton: joystick button 6 + positiveButton: altNegativeButton: altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 1 invert: 0 - type: 0 - axis: 0 + type: 2 + axis: 8 joyNum: 0 - serializedVersion: 3 m_Name: Jump descriptiveName: descriptiveNegativeName: negativeButton: - positiveButton: joystick button 1 + positiveButton: joystick button 0 altNegativeButton: altPositiveButton: gravity: 1000 @@ -253,13 +253,13 @@ InputManager: positiveButton: altNegativeButton: altPositiveButton: - gravity: 1000 + gravity: 0 dead: 0.25 - sensitivity: 0.1 + sensitivity: 1 snap: 0 invert: 0 type: 2 - axis: 2 + axis: 3 joyNum: 0 - serializedVersion: 3 m_Name: Mouse Y @@ -269,13 +269,13 @@ InputManager: positiveButton: altNegativeButton: altPositiveButton: - gravity: 1000 + gravity: 0 dead: 0.25 - sensitivity: 0.1 + sensitivity: 1 snap: 0 invert: 1 type: 2 - axis: 3 + axis: 4 joyNum: 0 - serializedVersion: 3 m_Name: Pause @@ -298,7 +298,7 @@ InputManager: descriptiveName: descriptiveNegativeName: negativeButton: - positiveButton: joystick button 9 + positiveButton: joystick button 7 altNegativeButton: altPositiveButton: gravity: 1000