PlayerAnimation.HorizontalAngle C# (CSharp) Method

HorizontalAngle() static private method

static private HorizontalAngle ( Vector3 direction ) : float
direction Vector3
return float
    static float HorizontalAngle(Vector3 direction)
    {
        return Mathf.Atan2 (direction.x, direction.z) * Mathf.Rad2Deg;
    }

Usage Example

 public void Init()
 {
     velocity.y = 0;
     speed      = velocity.magnitude;
     angle      = PlayerAnimation.HorizontalAngle(velocity);
 }
All Usage Examples Of PlayerAnimation::HorizontalAngle