Rotate: Matrix right but Quaternion wrong?

   Views 178   Replies 2   Subscribers 0
User Avatar
Member
22 posts
Joined: 8月 2023
Offline
I'm learning Matrix and Quaternion.

In this case,

I wanna rotate my each cube with the axis 'N'

I get the right result through Matrix but the wrong result through Quaternion

why?

how to use the way "qrotate()" to get the right result?



Right result when i use matrix to rotate:


Wrong Result through the ways of Quaternoin:



gits、pngs and hip in attach.

Thanks for help in advance!

Attachments:
RightResult.gif (4.4 MB)
WrongResult.gif (7.5 MB)
Quaternions_question.hip (385.9 KB)
Right result when i use matrix to rotate.png (2.0 MB)
Wrong Result through the ways of Quaternoin.png (2.0 MB)

User Avatar
Member
93 posts
Joined: 1月 2014
Offline
Hey jackdon4682!

you don't need the qrotate node and you are loosing information converting your quaternion to a vector and back.

Instead use quaternion multiply to rotate your orient by another quaternion.


Edited by Zybrand - 2025年3月26日 05:57:53

Attachments:
qmult1.png (797.2 KB)
qmult2.png (801.6 KB)

User Avatar
Member
22 posts
Joined: 8月 2023
Offline
Zybrand
Hey jackdon4682! ...

Damn, you're so good! I was struggling with the qrotate node and got the information wrong.

I can't thank you enough for the crystal clear explanation!
  • Quick Links