Asked • 03/18/19

rotating a quaternion on 1 axis?

I have a model rotated by a quaternion. I can only set the rotation, I can't add or subtract from anything. I need to get the value of an axis, and then add an angle to it (maybe a degree or radian?) and than re-add the modified quaternion. How can I do this? (answer on each axis).

1 Expert Answer

By:

Tyler M. answered • 10/27/22

Tutor
0 (0)

Java and Math Tutor

Tyler M.

So to rotate around the x axis for example, you could create a quaternion with createFromAxisAngle(1, 0, 0, M_PI/2) and multiply it by the current rotation quaternion of your model.
Report

10/27/22

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.