teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

Vector3になっていたのでVector2に編集しました。

2020/11/30 06:50

投稿

PinoMatcha
PinoMatcha

スコア368

answer CHANGED
@@ -6,5 +6,5 @@
6
6
  // ...
7
7
 
8
8
  // ↑の1行を ↓こう
9
- rb.velocity = movement + new Vector3(0, rb.velocity.y, 0);
9
+ rb.velocity = movement + new Vector2(0, rb.velocity.y);
10
10
  ```