unity渲染层级关系小结

摘要: 最近连续遇到了几个绘制图像之间相互遮挡关系不正确的问题,网上查找的信息比较凌乱,所以这里就把自己解决问题中总结的经验记录下来。 Unity中的渲染顺序自上而下大致分为三层。 最高层为Camera层,可以在Camera的depth那里设置,设置之后,图形的渲染顺序就是先绘制depth低的相机下的物体, 阅读全文
posted @ 2016-07-29 10:54 天涯|海角 阅读(258) 评论(0) 推荐(0) 编辑

鼠标顺时针旋转、逆时针旋转

摘要: 1 using UnityEngine; 2 using System.Collections; 3 4 public class ShouShi : MonoBehaviour 5 { 6 public Transform centerTra;//围绕旋转的中心 7 public Transfor 阅读全文
posted @ 2016-03-04 18:45 天涯|海角 阅读(335) 评论(0) 推荐(0) 编辑

鼠标拖拽、屏幕坐标与世界坐标转换

摘要: using UnityEngine;using System.Collections;public class InputTest : MonoBehaviour {public System.Action Drag;void OnEnable(){ Drag = DrayObject;}Vect... 阅读全文
posted @ 2016-01-26 10:56 天涯|海角 阅读(323) 评论(0) 推荐(0) 编辑