Closed hax0r31337 closed 2 years ago
Maybe it's a bug.
This is the correct code.
glm::vec3 limitMax = ikLink.m_limitMin * glm::vec3(-1);
glm::vec3 limitMin = ikLink.m_limitMax * glm::vec3(-1);
The reason Min and Max are opposite is to change the coordinate system from left hand to right hand.
I'm converting your code from C++ to Kotlin, but i see this in your code. https://github.com/benikabocha/saba/blob/51561d091963d46b6584040b2776726752b9f3fd/src/Saba/Model/MMD/PMXModel.cpp#L669-L671 i think it should be the code below, but i can't sure is this right, cuz my C++ skill is bad :(