Fixed delayed standing slide and made standard horz/vert axis movement uniform across keyboard and joystick
This commit is contained in:
@@ -42,7 +42,7 @@ public class PlayerController : MonoBehaviour
|
||||
|
||||
float yStore = moveDirection.y;
|
||||
//Need to switch to 'raw' when using keyboard
|
||||
moveDirection = (transform.forward * Input.GetAxis("Vertical")) + (transform.right * Input.GetAxis("Horizontal"));
|
||||
moveDirection = (transform.forward * Input.GetAxisRaw("Vertical")) + (transform.right * Input.GetAxisRaw("Horizontal"));
|
||||
|
||||
if (jump <= 1)
|
||||
{
|
||||
@@ -72,12 +72,12 @@ public class PlayerController : MonoBehaviour
|
||||
capsule.height /= 2;
|
||||
transform.localScale = new Vector3(transform.localScale.x, transformHeight/2, transform.localScale.z);
|
||||
|
||||
if(Input.GetKeyDown(KeyCode.LeftControl))
|
||||
if(Input.GetKeyDown(KeyCode.LeftControl) && characterController.velocity != new Vector3(0, 0, 0))
|
||||
{
|
||||
startTime = Time.time;
|
||||
}
|
||||
|
||||
if(characterController.velocity != new Vector3(0, 0, 0) && startTime + oneSec >= Time.time)
|
||||
if(startTime + oneSec >= Time.time)
|
||||
{
|
||||
|
||||
moveDirection = (moveDirection.normalized * speed * 2);
|
||||
|
||||
@@ -13,7 +13,7 @@ InputManager:
|
||||
positiveButton: right
|
||||
altNegativeButton: a
|
||||
altPositiveButton: d
|
||||
gravity: 3
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 3
|
||||
snap: 1
|
||||
@@ -29,7 +29,7 @@ InputManager:
|
||||
positiveButton: up
|
||||
altNegativeButton: s
|
||||
altPositiveButton: w
|
||||
gravity: 3
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 3
|
||||
snap: 1
|
||||
@@ -157,7 +157,7 @@ InputManager:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
gravity: 1000
|
||||
dead: 0.19
|
||||
sensitivity: 1
|
||||
snap: 0
|
||||
@@ -173,7 +173,7 @@ InputManager:
|
||||
positiveButton:
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 0
|
||||
gravity: 1000
|
||||
dead: 0.19
|
||||
sensitivity: 1
|
||||
snap: 0
|
||||
|
||||
Reference in New Issue
Block a user