Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Add animation when use camera.roll(real angel)



  • Hi all,
    I use roll(real angel) method to change roll angel of camera in Qt3d but, i have no idea to add animation to this action. I don't know what property of camera is changed by that method. For example:

    Camera {
    id: camera
    projectionType: CameraLens.PerspectiveProjection
    fieldOfView: 45
    aspectRatio: 4/3
    nearPlane : 0.1
    farPlane : 1000.0
    position: Qt.vector3d(0, -100, 30)
    upVector: Qt.vector3d( 0, 1, 0 )
    viewCenter: Qt.vector3d(0, 0, 0)
    }

    function changeRollAngel(action)
    {
        if(action == 1)
        {
            camera.roll(5)
        }
        else if(action == -1)
        {
            camera.roll(-5)
        }
    }

Log in to reply