android 화면상에서 터치한 곳으로 Ray 쏘기
if (Input.touchCount > 0) {
Touch touch = Input.GetTouch(0);
RaycastHit hit;
/* If we're currently not dragging any augmentation, do a raycast to find one in the scene. */
if (_activeObject == null) {
if (Physics.Raycast(Camera.main.ScreenPointToRay(touch.position), out hit)) {
SetMoveObject(hit.transform);
}
}
}
반응형