回答編集履歴
1
コードの記入
test
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
```C#
|
2
|
+
|
3
|
+
//WASDでの操作を想定しています。
|
4
|
+
|
5
|
+
if(Input.GetKey(KeyCode.W))/*動かすもの*/.transform.posiotion += camera.transform.forward;
|
6
|
+
|
7
|
+
if(Input.GetKey(KeyCode.S))/*動かすもの*/.transform.posiotion -= camera.transform.forward;
|
8
|
+
|
9
|
+
if(Input.GetKey(KeyCode.A))/*動かすもの*/.transform.posiotion -= camera.transform.right;
|
10
|
+
|
11
|
+
if(Input.GetKey(KeyCode.D))/*動かすもの*/.transform.posiotion += camera.transform.right;
|
12
|
+
|
13
|
+
```
|
14
|
+
|
15
|
+
としてみるのはどうでしょうか?
|
16
|
+
|
17
|
+
|
18
|
+
|
1
|
-
こちらのサイトはどうでしょうか?
|
19
|
+
もしくは、こちらのサイトはどうでしょうか?
|
2
20
|
|
3
21
|
[リンク](https://tech.pjin.jp/blog/2016/11/04/unity_skill_5/)
|