回答編集履歴
2
修正
test
CHANGED
@@ -8,6 +8,6 @@
|
|
8
8
|
|
9
9
|
// inputXに方向、moveSpeedは移動速度
|
10
10
|
|
11
|
-
rigidbody2D.AddForce(new Vector2(
|
11
|
+
rigidbody2D.AddForce(new Vector2( inputX * moveSpeed,0));
|
12
12
|
|
13
13
|
```
|
1
修正
test
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
```C#
|
8
8
|
|
9
|
+
// inputXに方向、moveSpeedは移動速度
|
10
|
+
|
9
|
-
rigidbody2D.AddForce(new Vector2(0, moveSpeed));
|
11
|
+
rigidbody2D.AddForce(new Vector2(0, inputX * moveSpeed));
|
10
12
|
|
11
13
|
```
|