Rotate with Quaterion around world axis, not objects axis

I have a Quaternion and want to rotate an object around the world axis instead of its own (transform.rotation * quaternionRot)?

How can I do this?

You say you “have a quaternion”, but it doesn’t sound like it’s the one you need. Without seeing what you have, I’d say try two things, in this order:

Reverse the order of the operands. (I don’t think this will work because you have the order I’d suspect would be useful already.)

Only use RotateAround if the first option isn’t working for you, for (presumably) faster execution, if you do actually already have a useful quaternion calculated. If this isn’t good information, please tell us more about what you’re already calculating.

Hey Jessy, I haven’t calculated a useful Quaternion.

I have a Quaternion, let’s say Quaternion.Euler(10.0f, 0.0f, 0.0f) and I want to rotate the object 10.0f degress around the worlds x-axis, not it’s own. Just like the RotateAround() method works.

Just reverse the order of the operands.

1 Like

Um… of course! Thanks for the enlightenment, some things can be so easy :wink:

Yeah, sorry for that doubt that I mentioned about it above. I’ve yet to find training material on quaternions that helped me much, so I still get confused about them. If you know of some kind of good video tutorial, please let me know; I seem to learn best from those.

As it is, my understanding is this:
if you multiply them left-to-right, you’re thinking in object space. If you multiply them right-to-left, you’re thinking in world space. However, this is observational; I never read this anywhere. If anyone can verify or destroy this idea, please do so.

Episode 5, maybe this helps. I personally don’t watch video tutorials so I’ve never seen this :smile:

Ehm, seems like you have to watch the video on Youtube.

Near the end, he says himself that he doesn’t understand the issue that gave you a problem.

He also says “Ellier” when he means “Euler”. I realize that it’s not pronounced like it’s spelled, but how you’d get “El-ee-er” out of it, I have no idea. :?