标签:main inpu raycast int cas inf sep 笔记 logs
LayerMask mask = 1 << LayerMask.NameToLayer("UI"); Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hitInfo; if (Physics.Raycast(ray, out hitInfo, 100000.0f, mask.value)) { ... }
标签:main inpu raycast int cas inf sep 笔记 logs
原文地址:http://www.cnblogs.com/guxin/p/unity-mouse-raycast-to-specified-layer.html