티스토리 뷰
RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit, 1000)) { position = new Vector3( hit.point.x, hit.point.y, hit.point.z ); }
'유니티' 카테고리의 다른 글
OnMouse... 관련 메세지가 호출이 되지 않을떄. (0) | 2015.09.02 |
---|---|
Animator Controller에 Animation이 추가가 되지 않을 떄. (0) | 2015.05.09 |
[SerializeField] (0) | 2015.03.24 |
출력 형식이 클래스 라이브러리인 프로젝트는 직접 시작할 수 없습니다. (0) | 2015.03.24 |