0

I am converting between coordinate systems where Z is the vertical axis in one, and Y in another. I have the rotation values represented as a quaternion.

I see this related issue but it's switching the handedness (DirectX and OpenGL): Switch axes and handedness of a quaternion?

How would I go about swapping these values? I'd prefer not to convert to a vector3, modify and convert back again.

Satchmo Brown
  • 293
  • 2
  • 11
  • So, I'm a bit confused what you need help with. You've linked to an answer that explains how to decide which axes to change/negate, and you have a type that lets you change those components, so where are you stuck in turning this into a working solution that serves your needs? – DMGregory Apr 30 '20 at 21:41
  • @DMGregory Sorry, if it switches the handedness, swap Y and Z, negate X, Y, Z and leave W alone. – Satchmo Brown Apr 30 '20 at 22:18
  • It sounds like you have your answer. Where have you run into a specific problem making it work for your needs? – DMGregory Apr 30 '20 at 22:21
  • I haven't seen any clarifications in the past 14 hours, so I'm putting this question on-hold for now as a duplicate. If you find the solution you've tried based on the existing Q&A is not serving your needs, please edit your question to clarify where you need help or how the output is differing from expectation, and we can re-open it to help you with that. – DMGregory May 01 '20 at 13:17

0 Answers0