private void Animate() { smoothedPlanarVelocity = Mathf.Lerp(smoothedPlanarVelocity, MoveBase.PlanarVelocity().magnitude, movementSmoothingSpeed * Time.deltaTime); MoveBase.animator.SetFloat("XVelocity", smoothedPlanarVelocity); }
void Animate() { smoothedPlanarVelocity = Mathf.Lerp(smoothedPlanarVelocity, MoveBase.PlanarVelocity().magnitude, movementSmoothingSpeed * Time.deltaTime); MoveBase.animator.SetFloat("XVelocity", currentlyGrounded ? smoothedPlanarVelocity : 0); MoveBase.animator.SetBool("Grounded", currentlyGrounded); MoveBase.animator.SetFloat("YVelocity", GetComponent <Rigidbody>().velocity.y); if (pivoting) { MoveBase.animator.SetTrigger("Pivot"); pivoting = false; } //MoveBase.animator.SetFloat("XVelocity", // new Vector3(MoveBase.rigid.velocity.x, 0, MoveBase.rigid.velocity.z).normalized.magnitude + // .1f); }