Smoothed animation for taking a swig.

This commit is contained in:
shakurass 2014-04-27 11:55:25 -06:00
commit d0a546ffac
16 changed files with 1306 additions and 481 deletions

View file

@ -68,11 +68,12 @@ public class PlayerController : MonoBehaviour {
playerAngle.eulerAngles = new Vector3(0f, -270f, 0f);
if (moveVertical > 0)
playerAngle.eulerAngles = new Vector3(0f, -90f, 0f);
// rigidbody.MovePosition (rigidbody.position + movement * speed * Time.deltaTime);
// rigidbody.position.Normalize ();
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rigidbody.MovePosition (rigidbody.position + movement * speed * Time.deltaTime);
rigidbody.position.Normalize ();
rigidbody.velocity = movement * speed;
rigidbody.freezeRotation = true;
}