benikabocha / saba

OpenGL Viewer (OBJ PMD PMX)
MIT License
442 stars 60 forks source link

the order of rotation? #14

Closed zhouhang95 closed 4 years ago

zhouhang95 commented 4 years ago

why not yaw-pitch-roll?

zhouhang95 commented 4 years ago

src/Saba/Model/MMD/MMDCamera.cpp

        rot = glm::rotate(rot, cam.m_rotate.y, glm::vec3(0, 1, 0));
        rot = glm::rotate(rot, cam.m_rotate.z, glm::vec3(0, 0, -1));
        rot = glm::rotate(rot, cam.m_rotate.x, glm::vec3(1, 0, 0));
benikabocha commented 4 years ago

Question of rotation order?

It is VMD specification. https://blog.goo.ne.jp/torisu_tetosuki/e/bc9f1c4d597341b394bd02b64597499d

I also confirmed that it works the same as MMM.

zhouhang95 commented 4 years ago

tks