2016年4月27日
摘要: public Transform target; public float moveSmooth=5f; Vector3 offset; void Start () { offset = transform.position - target.position;//获取相对位置 } void Upd 阅读全文
posted @ 2016-04-27 11:50 独蠢无双 阅读(4917) 评论(0) 推荐(0) 编辑
摘要: public float speed = 6f; Vector3 movement; void FixedUpdate () { float h = Input.GetAxisRaw("Horizontal"); float v = Input.GetAxisRaw("Vertical"); Mov 阅读全文
posted @ 2016-04-27 11:49 独蠢无双 阅读(7771) 评论(0) 推荐(0) 编辑
摘要: int floorMask; float camRayLenth = 100f;//摄像机射线距离 void Truning() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);//根据当前鼠标的位置,发射一条射线 Rayc 阅读全文
posted @ 2016-04-27 11:47 独蠢无双 阅读(1048) 评论(0) 推荐(0) 编辑