回答編集履歴

2

コードコメントを追記

2018/06/10 02:20

投稿

negitama
negitama

スコア943

test CHANGED
@@ -16,6 +16,8 @@
16
16
 
17
17
  ```C#
18
18
 
19
+ // 右キーも左キーも押されていなければ、速度をゼロにする
20
+
19
21
  if(!isRightPress && !isLeftPress){
20
22
 
21
23
  rb.velocity = Vector3.zero;

1

修正

2018/06/10 02:19

投稿

negitama
negitama

スコア943

test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  ```C#
18
18
 
19
- if(!isRightPress || !isLeftPress){
19
+ if(!isRightPress && !isLeftPress){
20
20
 
21
21
  rb.velocity = Vector3.zero;
22
22