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.
24 lines
640 B
24 lines
640 B
using UnityEngine; |
|
using System.Collections; |
|
|
|
public class MiniMap : MonoBehaviour { |
|
|
|
private Transform playerTransform; |
|
public Transform miniMapArrow; |
|
public Transform Cam; |
|
|
|
public float hight = 6.89f; |
|
|
|
// Use this for initialization |
|
void Start () { |
|
|
|
playerTransform = this.transform; |
|
} |
|
|
|
// Update is called once per frame |
|
void Update () |
|
{ |
|
Cam.transform.position = new Vector3(playerTransform.position.x, playerTransform.position.y + hight, playerTransform.position.z); |
|
miniMapArrow.localRotation = Quaternion.Euler(0, 0, -playerTransform.rotation.eulerAngles.y + 90); |
|
} |
|
}
|
|
|