# How to rotate the origin of rotation of a quaternion

Im working with a quaternion, and its roll pitch and yaw are based on its global location(Im not actually sure how quaternions work, im guessing its on fixed axis). So when i get the values they are always fixed in a certain direction, the "0" of yaw is in some fixed direction. What i would like to do is kind of "reset" the rotation so that its "0" is pointing to the direction directly in front of me and that all rotations from that point will be based on the "0" being the direction i was initially facing. How do i do this?

Example:
^---say this is the original origin or "0" of the rotation.
<     >
v

Then if i am facing down:
^
<     >
v---I would then like this to be the new origin or rotation.

• It sounds like you want to rotate with respect to the axes of some previously-rotated body. Is that the case? – Muphrid Dec 1 '15 at 4:12
• I think that can be another way of putting it. So after rotating it the first time to get a new origin, it will rotate again with respect to the new origin based on the original quaternion. – Inspector Dec 1 '15 at 17:05
• When you say origin that makes it sound like a translation is happening--that the central point of the object is moved. Is that what you mean? Or so you say origin and mean a set of axes? – Muphrid Dec 1 '15 at 17:09
• sorry i meant it as the axes rotation. So if your facing one way initially that would be the origin "currently" and what i would like is if i turned around that would be the new origin(me facing backwards). But thanks for trying to help, i figured it out. It turns out i just had to invert the quaternion i wanted as the new origin. – Inspector Dec 1 '15 at 20:32