Switched from ps4 functionality to xbox one functionality
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user