質問編集履歴
10
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
9
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
8
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
7
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
6
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
5
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
4
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
3
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
2
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
1
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,9 +1,21 @@
|
|
1
|
+
既にinstantiateで生成された複数のobjを
|
2
|
+
Findで取得し、positionをrandom.rangeで移動させ
|
1
|
-
|
3
|
+
取得したオブジェクトは個々をRandom.Rangeで移動させたいのですが
|
2
4
|
|
5
|
+
下記で実装したところ、 取得したオブジェクトはRandom.Rangeで移動することは
|
6
|
+
できたのですが、一箇所に固まってしまいます。
|
7
|
+
複数のobjを別々に移動させる方法はありますでしょうか
|
3
8
|
|
4
|
-
10コほどオブジェクトがあります。instantiateで生成するとき、オブジェクトは
|
5
|
-
|
9
|
+
float x;
|
10
|
+
float y;
|
11
|
+
float z;
|
6
12
|
|
13
|
+
x = Random.Range (-200.0f, 200.0f);
|
14
|
+
y = Random.Range (-200.0f, 200.0f);
|
15
|
+
z = Random.Range (-200.0f, 200.0f);
|
7
16
|
|
17
|
+
|
18
|
+
aa= GameObject.FindGameObjectsWithTag("obj");
|
19
|
+
foreach (GameObject tt in aa)
|
20
|
+
|
8
|
-
|
21
|
+
tt.transform.position=new Vector3(x,y,z);
|
9
|
-
ありますでしょうか
|