Need help on Quaternion.lookAt (NaN output)
-
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
lookAtcalculates the rotation of theforwardDirectionvector of an obj atsourcePositionto the other obj attargetPosition, so thatforwardafter rotation aligns totarget - source, and tries to keepupDirectionclose to the positive Y axis. Is this correct?