質問編集履歴
1
誤字
title
CHANGED
File without changes
|
body
CHANGED
@@ -40,15 +40,15 @@
|
|
40
40
|
private IEnumerator moveTarget(float speed)
|
41
41
|
{
|
42
42
|
Vector3 tmp = sphere.transform.position;
|
43
|
-
sphere.transform.position = Vector3.
|
43
|
+
sphere.transform.position = Vector3.MoveTowards(tmp, target1.transform.position, speed);
|
44
44
|
yield return new WaitForSeconds(3.0f) ;
|
45
45
|
|
46
46
|
Vector3 tmp2 = sphere.transform.position;
|
47
|
-
sphere.transform.position = Vector3.
|
47
|
+
sphere.transform.position = Vector3.MoveTowards(tmp2, target2.transform.position, speed);
|
48
48
|
yield return new WaitForSeconds(3.0f);
|
49
49
|
|
50
50
|
Vector3 tmp3 = sphere.transform.position;
|
51
|
-
sphere.transform.position = Vector3.
|
51
|
+
sphere.transform.position = Vector3.MoveTowards(tmp3, startPos, speed);
|
52
52
|
yield return new WaitForSeconds(3.0f);
|
53
53
|
}
|
54
54
|
|
@@ -58,6 +58,7 @@
|
|
58
58
|
StartCoroutine(moveTarget(speed));
|
59
59
|
}
|
60
60
|
}
|
61
|
+
|
61
62
|
```
|
62
63
|
|
63
64
|
### 試したこと
|