Do 6 mechanical arm shaft need rotation, translation, rotation, the first two steps are correct, behind the rotation of the wrong, the rotation of the main performance is the second time with setRotation (QQuaternion: : fromAxisAndAngle (QVector3D (1, 0, 0), 90.0 f)) found not the original X axis rotate, the rotation of the first led to the X axis direction has changed, and use setRotationX (90.0 f) can still around the original X axis rotation,
What method can let the rotating coordinate system don't follow model?
CodePudding user response:
You in every mechanical arm to instantiate new Qt3DCore: : QEntity (m_rootEntity); , set the father as a mechanical arm QEntity before, after, when you are in a rotating mechanical arm, his children will follow the rotation, so that you said above X will not change,