Raycastで得た点を中心にカメラを回転させたいです。
C#
1void Update () { 2 Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); 3 RaycastHit hit; 4 5 if (Physics.Raycast(ray, out hit, Mathf.Infinity)){ 6 Vector3 target = hit.collider.gameObject.transform.position; 7 } 8 }
targetを中心にカメラを回転させたいのですが、どうすればよいでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。