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.

1 Answers1

1

Just use Transform object:

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);
}

Using Transform, you can scale, rotate, translate your entity. See Qt3D help or examples for more informations.

Surfsky
  • 86
  • 5