You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
486 B
19 lines
486 B
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); |
|
} |
|
}
|
|
|