static private HorizontalAngle ( Vector3 direction ) : float | ||
direction | Vector3 | |
Résultat | float |
static float HorizontalAngle(Vector3 direction)
{
return Mathf.Atan2 (direction.x, direction.z) * Mathf.Rad2Deg;
}
public void Init() { velocity.y = 0; speed = velocity.magnitude; angle = PlayerAnimation.HorizontalAngle(velocity); }