回答編集履歴

1

コードを貼り付ける位置を間違えた

2022/05/13 08:52

投稿

tikaisan
tikaisan

スコア10

test CHANGED
@@ -3,11 +3,10 @@
3
3
  transform.position = new Vector3(player.transform.position.x,
4
4
  player.transform.position.y, -25);
5
5
  この-25はもともと-10だったのですが、弾が発射されたvectotrよりも値を低くしたら弾が表示されるようになりました。
6
- ```ここに言語を入力
7
- コード
8
6
  ```
7
+
9
8
  void Update()
10
- {
9
+ {
11
10
  GameObject player = GameObject.FindGameObjectWithTag("Player");
12
11
  if (player != null)
13
12
  {
@@ -15,4 +14,5 @@
15
14
  transform.position = new Vector3(player.transform.position.x,
16
15
  player.transform.position.y, -25);
17
16
  }
18
- }
17
+ }
18
+