Switched from ps4 functionality to xbox one functionality

This commit is contained in:
Gregory Campbell
2020-01-12 18:26:38 -05:00
parent 12ac3e2fce
commit fe0ac70b48
2 changed files with 27 additions and 27 deletions
+5 -5
View File
@@ -146,14 +146,14 @@ public class PlayerController : MonoBehaviour
} }
} }
if(Input.GetButton("Crouch")) if(Input.GetButton("Crouch") || Input.GetAxis("Crouch") == 1.0f)
{ {
characterController.height /= 2; characterController.height /= 2;
capsule.height /= 2; capsule.height /= 2;
transform.localScale = new Vector3(transform.localScale.x, transformHeight/2, transform.localScale.z); 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)) if((Input.GetAxis("Horizontal") != 0 || Input.GetAxis("Vertical") != 0))
{ {
@@ -197,7 +197,7 @@ public class PlayerController : MonoBehaviour
} else { } else {
slideTime = Time.time; slideTime = Time.time;
if(Input.GetButton("Crouch")) if(Input.GetButton("Crouch") || Input.GetAxis("Crouch") == 1.0f)
{ {
characterController.height /= 2; 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 //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++; dive++;
if(dive == 1){ if(dive == 1){
@@ -268,7 +268,7 @@ public class PlayerController : MonoBehaviour
velocity.x += moveDirection.x; velocity.x += moveDirection.x;
velocity.z += moveDirection.z; 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 //Remove or "lower" friction to add an 'ice' effect
velocity.x = Mathf.SmoothDamp(velocity.x, 0.0f, ref xVelocity, friction); velocity.x = Mathf.SmoothDamp(velocity.x, 0.0f, ref xVelocity, friction);
+22 -22
View File
@@ -186,16 +186,16 @@ InputManager:
descriptiveName: descriptiveName:
descriptiveNegativeName: descriptiveNegativeName:
negativeButton: negativeButton:
positiveButton: joystick button 7 positiveButton:
altNegativeButton: altNegativeButton:
altPositiveButton: altPositiveButton:
gravity: 1000 gravity: 0
dead: 0.001 dead: 0.19
sensitivity: 1000 sensitivity: 1
snap: 0 snap: 1
invert: 0 invert: 0
type: 0 type: 2
axis: 0 axis: 9
joyNum: 0 joyNum: 0
- serializedVersion: 3 - serializedVersion: 3
m_Name: Walk m_Name: Walk
@@ -218,23 +218,23 @@ InputManager:
descriptiveName: descriptiveName:
descriptiveNegativeName: descriptiveNegativeName:
negativeButton: negativeButton:
positiveButton: joystick button 6 positiveButton:
altNegativeButton: altNegativeButton:
altPositiveButton: altPositiveButton:
gravity: 1000 gravity: 0
dead: 0.001 dead: 0.19
sensitivity: 1000 sensitivity: 1
snap: 0 snap: 1
invert: 0 invert: 0
type: 0 type: 2
axis: 0 axis: 8
joyNum: 0 joyNum: 0
- serializedVersion: 3 - serializedVersion: 3
m_Name: Jump m_Name: Jump
descriptiveName: descriptiveName:
descriptiveNegativeName: descriptiveNegativeName:
negativeButton: negativeButton:
positiveButton: joystick button 1 positiveButton: joystick button 0
altNegativeButton: altNegativeButton:
altPositiveButton: altPositiveButton:
gravity: 1000 gravity: 1000
@@ -253,13 +253,13 @@ InputManager:
positiveButton: positiveButton:
altNegativeButton: altNegativeButton:
altPositiveButton: altPositiveButton:
gravity: 1000 gravity: 0
dead: 0.25 dead: 0.25
sensitivity: 0.1 sensitivity: 1
snap: 0 snap: 0
invert: 0 invert: 0
type: 2 type: 2
axis: 2 axis: 3
joyNum: 0 joyNum: 0
- serializedVersion: 3 - serializedVersion: 3
m_Name: Mouse Y m_Name: Mouse Y
@@ -269,13 +269,13 @@ InputManager:
positiveButton: positiveButton:
altNegativeButton: altNegativeButton:
altPositiveButton: altPositiveButton:
gravity: 1000 gravity: 0
dead: 0.25 dead: 0.25
sensitivity: 0.1 sensitivity: 1
snap: 0 snap: 0
invert: 1 invert: 1
type: 2 type: 2
axis: 3 axis: 4
joyNum: 0 joyNum: 0
- serializedVersion: 3 - serializedVersion: 3
m_Name: Pause m_Name: Pause
@@ -298,7 +298,7 @@ InputManager:
descriptiveName: descriptiveName:
descriptiveNegativeName: descriptiveNegativeName:
negativeButton: negativeButton:
positiveButton: joystick button 9 positiveButton: joystick button 7
altNegativeButton: altNegativeButton:
altPositiveButton: altPositiveButton:
gravity: 1000 gravity: 1000