Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98342

View3D mapping functions do not work correctly with orthographic camera and 2x pixel ratio

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.2.2
    • 6.2.1
    • Quick: 3D
    • None
    • 1
    • 1c9e83e60589aa2c9f0ef14acf79abde44c54571 (qt/qtquick3d/6.2.2)
    • QDS 3D - 2021 Week 45/46

    Description

      View3D mapping functions do not work correctly when View3D camera is OrthographicCamera and the screen has 2x pixel ratio. See the attached example to repro.

      The example has green cubes to provide coordinate reference. Cubes are located at (x:/-100, y:/-100).

      Clicking on the view maps the click position to the scene using mapTo3DScene and displays it. It also moves blue cube to that position.

      The red dot shows the result of mapFrom3DScene function on 100,100, which should put it on top of one of the green cubes.

      Use "Change camera" button to switch between two differently angled ortho cameras and one perspective camera to see differences.

      The example works as expected when perspective camera is selected and also for ortho cameras if screen device pixel ratio is 1.0, but fails to map correctly when ortho camera is selected and device pixel ratio is greater than 1.0.

      This bug causes QDS 3D edit view not work correctly when using orthographic camera.

      Attachments

        Issue Links

          Activity

            People

              e0348803 Miikka Heikkinen
              e0348803 Miikka Heikkinen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: