Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt3D, how can i rotate mesh at centre?
Forum Updated to NodeBB v4.3 + New Features

Qt3D, how can i rotate mesh at centre?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 396 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hakan AFAT
    wrote on last edited by
    #1
    Entity {
        id: sceneRoot
    
        Camera {
            id: camera
            projectionType: CameraLens.PerspectiveProjection
            fieldOfView: 90
            nearPlane : 0.1
            farPlane : 1000.0
            position: Qt.vector3d( 0.0, 0.0, 40.0 )
            upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
            viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
        }
    
        OrbitCameraController { camera: camera }
    
        components: [
            RenderSettings {
                activeFrameGraph: ForwardRenderer {
                    camera: camera
                    clearColor: "transparent"
                }
            },
            InputSettings { }
        ]
    
        PhongMaterial {
            id: material
        }
    
        Mesh{
            id: mesh
            source: "AIM-9.obj"
        }
    
        Transform {
            id: meshTransform
            scale: 0.2 
            rotation: fromEulerAngles(0, 0, 0)
        }
    
        Entity {
            id: torusEntity
            components: [ mesh, material, meshTransform ]
        }
    

    I set the rotation with using Transform rotation and set roll, pitch, yaw. But if i try to roll that, it is not roll at the centre. There is a distance difference between. How can i roll it at centre?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Silenzio76
      wrote on last edited by
      #2

      hello,

      I'm not a guru, but will help check out this QML Scene 2d.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved