Browse Source

added blend tree for strafing left and right

master
Joshua Reason 9 years ago
parent
commit
21fe28716b
2 changed files with 3 additions and 0 deletions
  1. BIN
      unity_Project/Assets/Character/Character_Animation.controller
  2. +3
    -0
      unity_Project/Assets/Scripts/thirdPersonController.cs

BIN
unity_Project/Assets/Character/Character_Animation.controller View File


+ 3
- 0
unity_Project/Assets/Scripts/thirdPersonController.cs View File

@ -106,6 +106,9 @@ public class thirdPersonController : MonoBehaviour {
animator.SetBool ("Grounded", grounded);
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));
curCollider = null;

Loading…
Cancel
Save