回答編集履歴
2
ソース修正
answer
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
using System.Collections.Generic;
|
8
8
|
using UnityEngine;
|
9
9
|
|
10
|
-
public class
|
10
|
+
public class PlayerMove : MonoBehaviour {
|
11
11
|
|
12
12
|
public GameObject target;
|
13
13
|
|
1
ソース修正
answer
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
-
スクリプトを分けているので下記がそれぞれ実行されて
|
2
|
-
|
3
1
|
1. ロックオンしている状態
|
4
2
|
2. CharacterControllerの移動
|
5
|
-
、1のロックオン状態が2のCharacterControllerでの移動中に上書きされているんだと思います。
|
6
3
|
|
7
|
-
スクリプトをまとめると機能すると思います。
|
4
|
+
スクリプトを分けているので1のロックオン状態が2のCharacterControllerでの移動中に上書きされているんだと思います。スクリプトをまとめると機能すると思います。
|
8
5
|
```cs
|
9
6
|
using System.Collections;
|
10
7
|
using System.Collections.Generic;
|