I
I
ideo2017-10-12 18:36:48
Unity
ideo, 2017-10-12 18:36:48

Implementation of quaternion addition?

Hello everyone,
It is necessary to correctly rotate in space so that there are no problems with the coincidence of the axes of the Euler angles. Accordingly, after reading the Unity3D manuals, I came across the built-in Qaternion class, which can translate from Euler angles to a quaternion, and vice versa.
Accordingly, the question is how to rotate the quaternion correctly if the input has the original quaternion (transfor.rotation) and the quaternion increment or the Euler angle increment.
Implementation for virtual reality for android.
Thanks for the answer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2017-10-12
@ideo

Convert eulers to quaternions with Quaternion.Euler , and multiply by the resulting rotation:
transform.rotation *= Quaternion.Euler(0, 90, 0);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question