2

I am new to Qt3D and I am wondering if it is possible to take an entity and rotate it around an axis eg. x-axis. Then translate it in a certain direction and then rotate it around the origin.

All I can do is one rotation and translation.

Thank you.

4

1 回答 1

1

只需使用 Transform 对象:

Transform {
    id: transform
    scale3D: Qt.vector3d(root.scaleX, root.scaleY, root.scaleZ);
    rotation: fromEulerAngles(rotateX, rotateY, rotateZ);
    translation: Qt.vector3d(root.x, root.y, root.z);
}

使用 Transform,您可以缩放、旋转、平移您的实体。有关详细信息,请参阅 Qt3D 帮助或示例。

于 2017-07-25T09:01:45.523 回答