Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Need help on Quaternion.lookAt (NaN output)

Need help on Quaternion.lookAt (NaN output)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 136 Views 2 Watching
  • 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.
  • F Offline
    F Offline
    FishBoneEK
    wrote last edited by
    #1

    https://doc.qt.io/qt-6/qml-qtquick3d-quaternion.html#lookAt-method

    For the following arguments:

    Quaternion.lookAt(
      Qt.vector3d(0.47212299704551697, -0.05714830011129379, -0.03842129930853844), 
      Qt.vector3d(0.0174984410405159, -0.1452823281288147, -0.038421452045440674), 
      Qt.vector3d(-0.9816991090774536, -0.19043900072574615, 0), 
      Qt.vector3d(0, 1, 0)
    )
    

    The output is a NaN quaternion? What's the issue here?

    My understanding is lookAt calculates the rotation of the forwardDirection vector of an obj at sourcePosition to the other obj at targetPosition, so that forward after rotation aligns to target - source, and tries to keep upDirection close to the positive Y axis. Is this correct?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jonas Karlsson
      wrote last edited by
      #2

      After a quick glance at the Qt source code it seems like this is a bug so please feel free to report it.

      F 1 Reply Last reply
      0
      • J Jonas Karlsson

        After a quick glance at the Qt source code it seems like this is a bug so please feel free to report it.

        F Offline
        F Offline
        FishBoneEK
        wrote last edited by
        #3

        @Jonas-Karlsson Thanks for the reply!
        However I cannot file a bug report on the Bug Tracker (the "Create" button won't respond).
        It would be nice if you would report it instead of me.

        P.S. The bug in the bug tracker, pretty ironic?

        Thanks!

        SGaistS 1 Reply Last reply
        0
        • F FishBoneEK

          @Jonas-Karlsson Thanks for the reply!
          However I cannot file a bug report on the Bug Tracker (the "Create" button won't respond).
          It would be nice if you would report it instead of me.

          P.S. The bug in the bug tracker, pretty ironic?

          Thanks!

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote last edited by
          #4

          @FishBoneEK Hi,

          Did you already check this pinned post ?

          It might help you sort out your bug tracker issue.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          F 1 Reply Last reply
          0
          • SGaistS SGaist

            @FishBoneEK Hi,

            Did you already check this pinned post ?

            It might help you sort out your bug tracker issue.

            F Offline
            F Offline
            FishBoneEK
            wrote last edited by
            #5

            @SGaist Just had a look to the post.
            Login is fine, Qt email and Atlassian email matches, I can see the issues on bug tracker.
            However the "Create" button still won't work.
            Plus I can't access the account profile page, it says:

            This page has restricted content
            This page has restrictions that limit who can view it. Try going back home or asking a workspace admin for viewing permission.
            
            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