|
@ -106,6 +106,9 @@ public class thirdPersonController : MonoBehaviour { |
|
|
animator.SetBool ("Grounded", grounded); |
|
|
animator.SetBool ("Grounded", grounded); |
|
|
animator.SetFloat("Run speed",new Vector3 (rigidbody.velocity.x, 0.0f,rigidbody.velocity.z ).magnitude * Mathf.Sign(movementY)); |
|
|
animator.SetFloat("Run speed",new Vector3 (rigidbody.velocity.x, 0.0f,rigidbody.velocity.z ).magnitude * Mathf.Sign(movementY)); |
|
|
|
|
|
|
|
|
|
|
|
Vector3 side = transform.InverseTransformDirection (rigidbody.velocity).normalized; |
|
|
|
|
|
animator.SetFloat ("Side",side.x); |
|
|
|
|
|
|
|
|
rigidbody.AddForce (new Vector3 (0.0f, -9.81f,0.0f)); |
|
|
rigidbody.AddForce (new Vector3 (0.0f, -9.81f,0.0f)); |
|
|
|
|
|
|
|
|
curCollider = null; |
|
|
curCollider = null; |
|
|