Raycast ignores all layers when trying to exclude just one

前端 未结 0 1022
半阙折子戏
半阙折子戏 2020-12-13 18:58

I have the following raycast:

Ray ray1 = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit1;
if (Physics.Raycast(ray1, out hit1, ~layer))
{
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题