鼠标坐标转换成世界坐标

来源:互联网 发布:傲慢与偏见与僵尸 知乎 编辑:程序博客网 时间:2024/06/06 03:35
using UnityEngine;using System.Collections;public class shubiao : MonoBehaviour {RaycastHit hitt = new RaycastHit();// Use this for initializationvoid Start () {}// Update is called once per framevoid Update () {Ray ray = camera.ScreenPointToRay(Input.mousePosition);Physics.Raycast(ray,out hitt);Debug.Log(hitt.point.x);}}

原创粉丝点击