我试过这样做:
Ogre::Vector3 src = bone1->_getDerivedOrientation() * Ogre::Vector3::UNIT_X;
Ogre::Quaternion quatt = src.getRotationTo(bone2->_getDerivedOrientation() * Ogre::Vector3::UNIT_X);
bone1->rotate(quatt);
src = bone1->_getDerivedOrientation() * Ogre::Vector3::UNIT_Y;
quatt = src.getRotationTo(bone2->_getDerivedOrientation() * Ogre::Vector3::UNIT_Y);
bone1->rotate(quatt);
src = bone1->_getDerivedOrientation() * Ogre::Vector3::UNIT_Z;
quatt = src.getRotationTo(bone2->_getDerivedOrientation() * Ogre::Vector3::UNIT_Z);
bone1->rotate(quatt);
并且根本没有运气。是否有一个简单的方法来设置一个骨骼旋转给其他任何提示或想法将非常感激。感谢。
答案 0 :(得分:1)
再一次,它永远不会失败。我发布此消息后,我会继续查看API文档并找到解决方案。对不起。
它很简单:
bone1->setOrientation(bone2->_getDerivedOrientation().w,bone2->_getDerivedOrientation().x,bone2->_getDerivedOrientation().y,bone2->_getDerivedOrientation().z);