2

I have imported several 3D meshes from blender to form a human figure and I want to rotate the arm-meshes about a specific origin point so that it will look like the normal movement of an arm. In order to display the mesh, it needs to be included in the Entity class although I can not use the Rotation property inside the entity class which has a property of origin in itself. If there is a way to rotate meshes about specific point?

Below is my code. I have to rotate the shoulder mesh, but it does not rotate about a specific origin point so its rotation does not match up with normal body movement

Entity{
    Mesh {
        id: rightShoulder
        source: "objects/RightShoulder2.obj"
    }

    Transform {
        id: RightShoulderTransform
        Scale { scale3D: Qt.vector3d(1.5, 1, 1.5) }

        Rotate {
           id:RightShoulderRotation
           angle: headSlider.value
           axis: Qt.vector3d(0, 1, 0)
        }
        Entity {
           id: headEntity
           components: [rightShoulder, material, RightShoulderTransform]
        }
   }
}
nfranklin
  • 385
  • 1
  • 8

1 Answers1

0

I found the way to solve it. Center of Blender editor space is "origin" point of your object. Like this:"origin"

Green point in mesh is origin point of selected object

Gleb
  • 1
  • 2