跟随鼠标NGUI

来源:互联网 发布:php 企业管理系统 编辑:程序博客网 时间:2024/05/21 10:38

 public GameObject mobj;
 void Update () {
        mobj.transform.localPosition = new Vector3(Input.mousePosition.x - Screen.width / 2, Input.mousePosition.y - Screen.height / 2, -10);

 }

0 0
原创粉丝点击