0
\$\begingroup\$

The documentation is totally unclear about it. And also what does" Angles are measured clockwise when looking along the rotation axis toward the origin" mean? Are they measured clockwise looking from where? Documentation: https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.matrix.xmmatrixrotationy(v=vs.85).aspx

\$\endgroup\$
2
\$\begingroup\$

It's actually right there in the documentation you linked (emphasis mine):

Angle of rotation around the y-axis, in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

The "measured clockwise when looking along..." bit is intended to clarify the semantics of the rotation. Imagine a pencil which represents your axis of rotation (the Y axis in this case). Imagine the tip of the pencil, the bit you write with, is the origin. If you are somewhere on that axis looking away from the origin, a clockwise rotation goes one way relative to the world. If you are somewhere on that axis looking towards the origin, the clockwise rotation goes the opposite way relative to the world.

The convention of XMMatrixRotationY is the latter.

\$\endgroup\$
  • \$\begingroup\$ Josh Petrie♦ i feel so dumb right now, thank you, no idea how i missed that \$\endgroup\$ – Emanuele Mar 5 '17 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.