标签:game 模拟 获取 player bsp update 视角 指南针 void
private int zRotation;
public GameObject obj;
public void Update()
{
//obj = GameObject.Find("Camera"); //获取名为Camera的相机对象
zRotation = player.transform.eulerAngles.y; //player是unity第一人称
compass.transform.eulerAngles = new Vector3(0, 0, zRotation); //改变image的Z轴rotation
}
标签:game 模拟 获取 player bsp update 视角 指南针 void
原文地址:http://www.cnblogs.com/Study088/p/7605546.html