Trying to figure out how to convert a Vector3 to a Quaternion. Also will it be OK if I need to constantly update said value?
答案 0 :(得分:4)
You can quite easily convert a Vector3 to a quaternion by using, for example, this:
Quaternion quaternion = Quaternion.Euler(v.x, v.y, v.z);
So, for example, that's
Quaternion rot = Quaternion.Euler(V3.x, V3.y, V3.z);
That should do it!