using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Rotater : MonoBehaviour
{
    public Transform rotater;

    public void DoRotate(Vector3 tranDir)
    {
        float angle = Vector3.SignedAngle(Vector3.right, tranDir, Vector3.up);
        rotater.localRotation = Quaternion.Euler(0, angle, 0);
    }
    public void DoRotate(float y)
    {
        rotater.localRotation = Quaternion.Euler(0, y, 0);
    }
}
