using System.Collections; using System.Collections.Generic; using UnityEngine; public class DirectionRuler : MonoBehaviour { public GameObject ruler; private float direction_; public Transform camera_; // Use this for initialization void Start () { } // Update is called once per frame void Update () { direction_ = (2115f - 395f) / 360f * camera_.localEulerAngles.y + 395f; ruler.transform.localPosition = new Vector3(direction_, 8f,0f); } }