回答編集履歴
1
追記
test
CHANGED
@@ -1,5 +1,23 @@
|
|
1
|
+
> クォータニオンにvector3を乗算することで起こることはなんでしょうか?
|
1
2
|
[Quaternion-operator \* - Unity スクリプトリファレンス](https://docs.unity3d.com/ja/2019.4/ScriptReference/Quaternion-operator_multiply.html)
|
2
3
|
|
3
4
|
> public static Vector3 operator * (Quaternion rotation, Vector3 point);
|
4
5
|
> 説明
|
5
6
|
> point の点に rotation の回転をさせます。
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
> this.transform.position = this.transform.rotation * Vector3.up * Time.time;
|
11
|
+
> この部分の式について、日本語で何をしているのか説明出来ないでしょうか?
|
12
|
+
|
13
|
+
`this.transform.rotation`は
|
14
|
+
[Transform-rotation - Unity スクリプトリファレンス](https://docs.unity3d.com/ja/2022.2/ScriptReference/Transform-rotation.html)
|
15
|
+
> Transform.rotation
|
16
|
+
> public Quaternion rotation ;
|
17
|
+
> 説明
|
18
|
+
> A Quaternion that stores the rotation of the Transform in world space.
|
19
|
+
|
20
|
+
の通り、そのオブジェクトのワールド座標に対する回転、つまり姿勢を表しています
|
21
|
+
`Vector3.up`はワールド座標上の"上"方向ですから
|
22
|
+
ワールド座標上の"上"方向を、あるオブジェクトのワールド座標に対する回転だけ回転させたものなので、
|
23
|
+
つまりはそのオブジェクトの"上"方向になります
|