Answers for "How do I do operations with a Vector3 and a Quaternion?"
http://answers.unity.com/questions/1484483/how-do-i-do-operations-with-a-vector3-and-a-quater.html
The latest answers for the question "How do I do operations with a Vector3 and a Quaternion?"Answer by Bunny83
http://answers.unity.com/answers/1484496/view.html
You seem to have trouble to understand what a Quaternion actually is. There are multiple ways to express rotations or orientations in 3d. One common way are [Euler angles][1]. Another, completely different way is using [a unit quaternion][2]. The components of a quaternion do not represent angles. They are actually resemble a four dimensional complex number.
<br>
You almost never want to mess with individual components of a quaternion. It's a normalized complex number and should be treated as "one thing". Unlike euler angles which represent three seperate consecutive rotations around world axes, a quaterion can directly represent any 3d rotation as one "operation". This has many advantages. For example while euler angles can suffer from [gimbal lock][3], quaterions do not have this problem. They also allow direct interpolations between two rotations.
<br>
If you want to rotate your object around the y axis you have several options. The easiest one would be to use [Transform.Rotate][4]:
transform.Rotate(0, speed * Time.deltaTime, 0, Space.World);
<br>
Another solution is to create a relative rotation using either [Quaterion.Euler][5] or [Quaterion.AngleAxis][6] and rotate the object by this rotation
transform.rotation = Quaterion.AngleAxis(speed * Time.deltaTime, Vector3.up) * transform.rotation;
<br>
Note that those examples will rotate around the world up axis. If you want to rotate around the local up vector you would use Space.Self for Rotate and the apropriate axis for AngleAxis which would be transform.up.
It highly depends on your usecase and what method you prefer.
<br>
If you are interested in how a quaterion works i recommend this [Numberphile video on quaterions][7]
[1]: https://en.wikipedia.org/wiki/Euler_angles
[2]: https://en.wikipedia.org/wiki/Quaternion
[3]: https://en.wikipedia.org/wiki/Gimbal_lock
[4]: https://docs.unity3d.com/ScriptReference/Transform.Rotate.html
[5]: https://docs.unity3d.com/ScriptReference/Quaternion.Euler.html
[6]: https://docs.unity3d.com/ScriptReference/Quaternion.AngleAxis.html
[7]: https://www.youtube.com/watch?v=3BR8tK-LuB0Sat, 24 Mar 2018 00:56:37 GMTBunny83Answer by foxtrot117
http://answers.unity.com/answers/1484492/view.html
transform.rotation.eulerAngles = Vector3(floatx,floaty,floatz);
read more here:
https://docs.unity3d.com/ScriptReference/Quaternion.htmlSat, 24 Mar 2018 00:47:01 GMTfoxtrot117